Bug 2520584 (CVE-2026-64846)

Summary: CVE-2026-64846 nix: Nix: Arbitrary file truncation via time-of-check/time-of-use race
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security <prodsec-ir-bot>
Status: NEW --- QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: akhatavk, anpicker, anthomas, aos-team-art-private, aprice, aruklets, asdas, bbrownin, bparees, brasmith, cochase, dbosanac, doconnor, dpaolell, dranck, dschmidt, ehelms, gbenhaim, ggainey, gotiwari, hasun, hoberger, jcantril, jdelft, jfula, jhorak, jlanda, jowilson, jpasqual, jreimann, jsamir, jupierce, juwatts, kshier, lgarciaa, lpele, mbiarnes, mdellweg, mdessi, mhulan, mrizzi, mvyas, niyer, nmoumoul, nyancey, oezr, ometelka, osousa, pcattana, pcreech, ppalepu, ppostler, prdhamdh, ptisnovs, rchan, rekumar, rhel-process-autobot, rojacob, sarad, sghai, sidsharm, simaishi, smallamp, sprizend, stcannon, suppawar, syedriko, teagle, tmalecek, twaugh, vlaad, vvoronko, watson-tool-maintainers, xdharmai, yguenane
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
A flaw was found in Nix. A malicious derivation, when executed with the `recursive-nix` experimental feature enabled, can exploit a time-of-check/time-of-use (TOCTOU) race condition in the final symlink handling of the LocalStore restore path. This allows the Nix process or nix-daemon to create or truncate an empty file outside the build sandbox with the daemon user's permissions. This vulnerability does not allow for arbitrary content writes and requires a successful race condition.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description OSIDB Bzimport 2026-08-20 16:54:50 UTC
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.