CVE-2021-35937
NixOS vulnerability analysis and mitigation

Overview

A race condition vulnerability was found in rpm (CVE-2021-35937). A local unprivileged user could use this flaw to bypass the checks that were introduced in response to CVE-2017-7500 and CVE-2017-7501, potentially gaining root privileges. The vulnerability was discovered in 2021 and affects the RPM Package Manager, which is a command-line driven package management system capable of installing, uninstalling, verifying, querying, and updating software packages (MITRE, Ubuntu).

Technical details

The vulnerability stems from a Time-of-Check-Time-of-Use (TOCTOU) race condition in the way RPM handles symlink checks. The issue occurs between the call to lstat() that finds a safe symlink and the open() that creates a new file, where the policy of "Only follow directory symlinks owned by target directory owner or root" is not properly enforced. While exploits are challenging due to the narrow timing window between calls, techniques like mazes could potentially be used to delay the stat() long enough for a reliable exploit (Red Hat Bugzilla).

Impact

The highest threat from this vulnerability is to data confidentiality and integrity as well as system availability. A successful exploit could allow an unprivileged local user to gain root privileges on the system. This could lead to complete system compromise (MITRE).

Mitigation and workarounds

The vulnerability was fixed in RPM version 4.18.0. Organizations should upgrade to this or later versions to mitigate the risk. The fix involved refactoring file and directory operations to use fd-based APIs throughout (RPM Release). Various Linux distributions have also released security updates to address this vulnerability, including Red Hat Enterprise Linux and Ubuntu.

Additional resources


SourceThis report was generated using AI

Related NixOS vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-61619HIGH7.5
  • NixOSNixOS
  • android
NoNoDec 01, 2025
CVE-2025-61618HIGH7.5
  • NixOSNixOS
  • android
NoNoDec 01, 2025
CVE-2025-61617HIGH7.5
  • NixOSNixOS
  • android
NoNoDec 01, 2025
CVE-2025-61610HIGH7.5
  • NixOSNixOS
  • android
NoNoDec 01, 2025
CVE-2025-61609HIGH7.5
  • NixOSNixOS
  • android
NoNoDec 01, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management