Nix: Arbitrary file truncation outside the sandbox with recursive-nix experimental feature

Summary

CVECVE-2026-64846
StatePUBLISHED
AssignerGitHub_M
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-08-20 17:19:16 UTC
Updated2026-08-20 20:17:45 UTC
DescriptionNix 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


VersionSourceTypeScoreSeverityVector
3.1[email protected]Secondary2.8LOWCVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:N/I:L/A:N
3.1CNADECLARED2.8LOWCVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:N/I:L/A:N

CVSS v3.1 Breakdown

Attack Vector
Local
Attack Complexity
High
Privileges Required
Low
User Interaction
None
Scope
Changed
Confidentiality
None
Integrity
Low
Availability
None

CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:N/I:L/A:N

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA NixOS Nix affected < 2.35.0 Not specified

References

ReferenceSourceLinkTags
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

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report