CVE-2021-35939
NixOS vulnerability analysis and mitigation

Overview

CVE-2021-35939 is a security vulnerability in RPM (Red Hat Package Manager) discovered in 2021. The issue stems from an incomplete fix for previous vulnerabilities (CVE-2017-7500 and CVE-2017-7501), where the security check was only implemented for the parent directory of the file to be created. A local unprivileged user who owns another ancestor directory could potentially use this flaw to gain root privileges (CVE, Red Hat).

Technical details

The vulnerability exists because the security check for unsafe symlinks was not performed for intermediary directories during package installation. The fix required complex refactoring of RPM internals, including converting all file system management operations to use the POSIX.1-2008 *at() family of calls. The issue was fixed in RPM version 4.18.0, which introduced new requirements for operating systems to support POSIX.1-2008 level APIs (RPM Release, GitHub PR).

Impact

The highest threat from this vulnerability is to data confidentiality, integrity, and system availability. An attacker could potentially gain root privileges by exploiting this flaw. The vulnerability requires that a similar directory structure exists both at the location where RPM operates and for the files the attacker wants to control (CVE).

Mitigation and workarounds

The vulnerability was fixed in RPM version 4.18.0. The fix involves validating intermediate symlinks during installation and implementing comprehensive directory tree validation. Users should upgrade to RPM version 4.18.0 or later to address this vulnerability (RPM Release, Gentoo).

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-2026-22783HIGH8.1
  • NixOSNixOS
  • iris
NoYesJan 12, 2026
CVE-2026-0821MEDIUM6.9
  • NixOSNixOS
  • quickjs
NoNoJan 10, 2026
CVE-2025-68949MEDIUM5.3
  • NixOSNixOS
  • n8n
NoYesJan 13, 2026
CVE-2026-22784LOW2.3
  • NixOSNixOS
  • lychee
NoYesJan 12, 2026
CVE-2026-23497LOW1.3
  • NixOSNixOS
  • learning
NoYesJan 14, 2026

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