The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2021-35938

CVE-2021-35938: Rpm Package Manager Privilege Escalation

CVE-2021-35938 is a privilege escalation flaw in Rpm package manager caused by a symbolic link issue. Local users can exploit this to gain elevated privileges. This article covers technical details, affected versions, and mitigation.

Published: March 4, 2026

CVE-2021-35938 Overview

A symbolic link (symlink) vulnerability was discovered in the RPM Package Manager that affects how permissions and credentials are applied during file installation. This race condition flaw allows a local unprivileged user to exploit the timing window between file installation and permission setting to replace the original file with a symbolic link pointing to a security-critical system file.

Critical Impact

Local attackers can exploit this symlink race condition to escalate privileges on the system, potentially gaining root access and compromising data confidentiality, integrity, and system availability.

Affected Products

  • RPM Package Manager (all versions prior to fix)
  • Fedora 34
  • Red Hat Enterprise Linux 7.0, 8.0, and 9.0

Discovery Timeline

  • 2022-08-25 - CVE-2021-35938 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2021-35938

Vulnerability Analysis

This vulnerability is classified as CWE-59 (Improper Link Resolution Before File Access), commonly known as a symlink attack. The flaw exists in the RPM package manager's file installation process, where there is a critical timing window between when a file is installed and when its permissions and ownership are subsequently set.

During package installation, RPM creates the target file with certain default permissions, then applies the desired permissions and credentials in a separate operation. An attacker with local access to the system can exploit this Time-of-Check Time-of-Use (TOCTOU) race condition by monitoring the installation process and replacing the newly created file with a symbolic link pointing to a sensitive system file before the permission-setting operation completes.

When RPM then applies the intended permissions to what it believes is the package file, it actually modifies the permissions on the symlink target—potentially a critical system file such as /etc/shadow, /etc/sudoers, or system binaries. This can result in unauthorized access to sensitive data or the ability to execute privileged operations.

Root Cause

The root cause of this vulnerability lies in the non-atomic nature of the file installation and permission-setting operations in RPM. The package manager does not adequately verify that the file it is modifying permissions on is the same file it originally created, nor does it implement proper safeguards against symlink substitution during the vulnerable window.

The fix, as implemented in GitHub RPM Pull Request #1919, addresses this by ensuring proper link resolution and validation before applying file permissions.

Attack Vector

The attack requires local access to the system with the ability to execute code as an unprivileged user. The attacker must:

  1. Monitor for RPM package installation activity
  2. Identify the target file being installed during the vulnerable timing window
  3. Rapidly replace the file with a symbolic link to a security-critical file
  4. Wait for RPM to apply permissions to the symlink target

The attack is local in nature, meaning the attacker must already have some level of access to the system. However, successful exploitation can elevate their privileges significantly, potentially to root level.

The vulnerability mechanism involves exploiting the race condition during RPM's file installation process. When a package is installed, RPM first creates the file, then sets permissions in a separate step. An attacker can replace the file with a symlink to a sensitive target (e.g., /etc/shadow) between these operations, causing RPM to inadvertently modify the target file's permissions. Technical details are available in the Red Hat Bugzilla Report.

Detection Methods for CVE-2021-35938

Indicators of Compromise

  • Unexpected permission changes on critical system files such as /etc/shadow, /etc/passwd, or /etc/sudoers
  • Presence of suspicious symbolic links in directories where RPM packages are being installed
  • Unusual local user activity during package installation operations
  • Modified timestamps on system-critical files that do not correlate with authorized administrative activity

Detection Strategies

  • Monitor file system operations during RPM package installations for symlink creation activity
  • Implement file integrity monitoring (FIM) on critical system files to detect unauthorized permission changes
  • Configure auditd rules to capture symlink creation events in common package installation directories
  • Review system logs for anomalous RPM installation patterns or failures

Monitoring Recommendations

  • Enable enhanced audit logging for file operations involving symlink(), chmod(), and chown() system calls
  • Deploy endpoint detection and response (EDR) solutions capable of detecting TOCTOU race condition exploitation
  • Implement regular file permission audits on critical system files to identify unauthorized changes
  • Monitor for privilege escalation attempts following RPM package installations

How to Mitigate CVE-2021-35938

Immediate Actions Required

  • Update RPM to version 4.18.0 or later, which contains the fix for this vulnerability
  • Apply vendor-specific security patches from Red Hat, Fedora, or other distribution maintainers
  • Restrict local user access on systems where RPM package installations are performed
  • Implement file integrity monitoring on critical system files as a compensating control

Patch Information

The vulnerability has been addressed in RPM version 4.18.0 and later. The fix is available in GitHub commit 25a435e90844ea98fe5eb7bef22c1aecf3a9c033. Distribution-specific patches are available from:

  • Red Hat CVE Advisory
  • Gentoo GLSA Advisory
  • RPM Release 4.18.0 Information

Organizations should consult their Linux distribution's security advisory channels for specific update instructions.

Workarounds

  • Limit RPM package installations to single-user mode or controlled environments where local user activity is restricted
  • Implement strict access controls to prevent unprivileged users from executing code during package installation windows
  • Use file system mount options such as nosymfollow where supported to prevent symlink traversal
  • Consider containerized or isolated environments for package installation operations where feasible
bash
# Configuration example: Enable auditd monitoring for symlink operations
# Add to /etc/audit/rules.d/symlink.rules
-a always,exit -F arch=b64 -S symlink -S symlinkat -k symlink_monitor
-a always,exit -F arch=b32 -S symlink -S symlinkat -k symlink_monitor

# Reload audit rules
auditctl -R /etc/audit/rules.d/symlink.rules

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypePrivilege Escalation

  • Vendor/TechRpm

  • SeverityMEDIUM

  • CVSS Score6.7

  • EPSS Probability0.15%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-59
  • Technical References
  • SUSE Bugzilla Report

  • RPM Release Information

  • Gentoo GLSA Advisory
  • Vendor Resources
  • Red Hat CVE Advisory

  • Red Hat Bugzilla Report

  • GitHub RPM Commit

  • GitHub RPM Pull Request
  • Related CVEs
  • CVE-2021-35937: RPM Privilege Escalation Vulnerability

  • CVE-2026-2625: rust-rpm-sequoia DoS Vulnerability

  • CVE-2021-20271: RPM Package Manager RCE Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English