Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessEnable recursive-nix on target system
-
DeliverySubmit malicious derivation via nix-daemon
-
ExploitTrigger LocalStore path restore in writeFile
-
ExecutionRace daemon between path resolution and O_TRUNC open
-
PersistSubstitute symlink at target path
-
ImpactDaemon truncates or creates file outside sandbox
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling UNIX symlink resolution
|
| Exploitation Conditions | Exploitation requires the |
| Impact | The CVSS 3.1 score of 2.8 (AV:L/AC:H/PR:L/UI:N/S:C/C:N/I:L/A:N) reflects the tightly constrained nature of this vulnerability: local system access is required, the race must be won (AC:H), and the only achievable primitive is creating or zeroing out files - arbitrary content writes are not possible. The Scope:Changed metric is appropriate because the impact escapes the build sandbox to the nix-daemon's host filesystem, but the integrity impact is rated Low given the empty-file-only constraint. No EPSS data was provided in the input, so exploitation probability cannot be quantified from that signal. The vulnerability is not in CISA KEV, and no public exploit code has been identified. The non-default requirement for |
| Exploit ScenarioDerived | An attacker with local access and permission to submit Nix derivations on a system with |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 20, 2026
Sandbox escape in Nix versions before 2.35.0 allows a malicious build derivation - executed under the experimental recursive-nix feature - to create or truncate empty files outside the build sandbox using the nix-daemon's permissions by exploiting a TOCTOU race in the LocalStore path-restore logic. The race window exists between path resolution and the open() call with O_TRUNC in writeFile, which previously lacked O_NOFOLLOW enforcement, letting an attacker substitute a symlink mid-flight to redirect the write. No public exploit has been identified and the vulnerability is not listed in CISA KEV; the official fix is confirmed in Nix 2.35.0.
RemediationAI
Upgrade to Nix 2.35.0 or later, which resolves this vulnerability by enforcing FinalSymlink::DontFollow through all writeFile call sites in the LocalStore restore path, backed by O_NOFOLLOW at the syscall level. The fix is confirmed in upstream PR #15401 and commit 26679828; the security advisory is at https://github.com/NixOS/nix/security/advisories/GHSA-6h4g-g5j9-fm5f. As a compensating control before patching, explicitly remove recursive-nix from the experimental-features list in /etc/nix/nix.conf - this eliminates the attack vector entirely at the cost of losing recursive derivation evaluation capability. Restricting which user accounts may submit and execute builds via the nix-daemon reduces the pool of potential attackers but does not close the underlying race and should not be treated as a full mitigation.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The vulnerability resides in Nix's libutil file I/O layer across src/libutil/file-content-address.cc and src/libutil/file-system.cc. The restorePath function in the LocalStore restore path called writeFile without propagating the FinalSymlink::DontFollow flag, meaning the underlying POSIX open() was issued with O_TRUNC but without O_NOFOLLOW. CWE-61 (UNIX Symbolic Link Following) characterizes the root cause: the gap between path resolution (time-of-check) and file descriptor acquisition (time-of-use) allows an adversary-controlled build sandbox to race the nix-daemon by atomically replacing the target path with a symlink pointing elsewhere. The fix in PR #15401 (commit 26679828) propagates FinalSymlink::DontFollow through all call sites and adds the O_NOFOLLOW flag to open() on POSIX systems and the equivalent FILE_FLAG_OPEN_REPARSE_POINT on Windows. The affected CPE is cpe:2.3:a:nixos:nix:*:*:*:*:*:*:*:* for all versions prior to 2.35.0.
Know when Nix gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:L/AC:H/PR:L/UI:N/S:C/C:N/I:L/A:N
Local-only exploitation via race condition (AC:H), low-privilege derivation submission (PR:L), sandbox escape changes scope (S:C), limited to empty-file creation (I:L), no confidentiality or availability impact.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
1DescriptionCVE.org
Nix is a package manager for Linux and other Unix systems. Prior to 2.35.0, a malicious derivation executed with the recursive-nix experimental feature can exploit a time-of-check/time-of-use race involving final symlink handling in the LocalStore restore path. The race can cause writeFile to follow a substituted final symlink when opening a path with O_TRUNC instead of enforcing FinalSymlink::DontFollow, allowing the Nix process or nix-daemon to create or truncate an empty file outside the build sandbox with the daemon user's permissions. The primitive does not provide arbitrary-content writes and requires winning the race. This issue is fixed in version 2.35.0.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Local privilege escalation in Nix package manager daemon (versions prior to 2.34.5/2.33.4/2.32.7/2.31.4/2.30.4/2.29.3/2.
Nix through 2.3 allows local users to gain access to an arbitrary user's account because the parent directory of the use
An issue was discovered in the nix crate 0.16.0 and later before 0.20.2, 0.21.x before 0.21.2, and 0.22.x before 0.22.2
Nix is a package manager for Linux and other Unix systems. Rated high severity (CVSS 8.8), this vulnerability is remotel
Local privilege escalation in Nix (before 2.35.3) and Lix (before 2.95.4) allows an unprivileged local user to escalate
An integer overflow in list allocation inside the Nix expression evaluator - and in the Lix fork - can drive an out-of-b
Nix releases before 2.35.3 in unsandboxed macOS or FreeBSD deployments permit a local authenticated build user to establ
Seatbelt sandbox escape on macOS in Nix before 2.35.3 and Lix before 2.95.4 lets a local attacker cause a crafted build
Local privilege escalation in Nix before 2.35.3 allows a local attacker with access to the user account that installed t
EUVD-2026-63424
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB