Nix: Arbitrary file truncation outside the sandbox with recursive-nix experimental feature
Summary
| CVE | CVE-2026-64846 |
|---|---|
| State | PUBLISHED |
| Assigner | GitHub_M |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2026-08-20 17:19:16 UTC |
| Updated | 2026-08-20 20:17:45 UTC |
| Description | 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. |
Risk And Classification
Primary CVSS: v3.1 2.8 LOW from [email protected]
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:N/I:L/A:N
EPSS: 0.000870000 probability, percentile 0.004390000 (date 2026-08-21)
Problem Types: CWE-61 | CWE-367 | CWE-61 CWE-61: UNIX Symbolic Link (Symlink) Following | CWE-367 CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 3.1 | [email protected] | Secondary | 2.8 | LOW | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:N/I:L/A:N |
| 3.1 | CNA | DECLARED | 2.8 | LOW | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:N/I:L/A:N |
CVSS v3.1 Breakdown
Attack Vector
LocalAttack Complexity
HighPrivileges Required
LowUser Interaction
NoneScope
ChangedConfidentiality
NoneIntegrity
LowAvailability
NoneCVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:N/I:L/A:N
Vendor Declared Affected Products
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| github.com/NixOS/nix/commit/26679828f74ee6e82a4100904e6361f993ff5390 | [email protected] | github.com | |
| github.com/NixOS/nix/pull/15401 | [email protected] | github.com | |
| github.com/NixOS/nix/security/advisories/GHSA-6h4g-g5j9-fm5f | [email protected] | github.com | |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
No vendor comments have been submitted for this CVE.
There are currently no legacy QID mappings associated with this CVE.