Skip to main content

Nix EUVDEUVD-2026-63424

| CVE-2026-64846 LOW
UNIX Symbolic Link (Symlink) Following (CWE-61)
2026-08-20 GitHub_M
2.8
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Enable recursive-nix on target system
  2. Delivery
    Submit malicious derivation via nix-daemon
  3. Exploit
    Trigger LocalStore path restore in writeFile
  4. Execution
    Race daemon between path resolution and O_TRUNC open
  5. Persist
    Substitute symlink at target path
  6. Impact
    Daemon 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 recursive-nix experimental feature to be explicitly enabled in the Nix configuration (experimental-features = recursive-nix in nix.conf or equivalent), which is off by default and considered experimental. The attacker must have local system access with at least low-privilege ability to submit and execute Nix derivations (confirmed by CVSS PR:L). The race condition must be won, which the CVSS AC:H metric reflects as a meaningful constraint. The impact is strictly limited to creating or truncating files to empty - the attacker cannot write arbitrary content, severely limiting exploitation utility. Systems where no untrusted user can submit derivations (single-user developer machines, locked-down build servers without multi-tenancy) face no practical risk. Exploitation does not affect systems running Nix with only stable experimental features enabled, nor systems that have not activated recursive-nix.

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 recursive-nix to be explicitly enabled significantly narrows the realistic attack surface - most Nix installations in production do not use this experimental feature. Multi-tenant CI/CD environments or shared NixOS build servers that allow untrusted derivations with recursive-nix enabled represent the primary realistic threat scenario; standard single-user developer workstations face negligible practical risk.

Exploit ScenarioDerived

An attacker with local access and permission to submit Nix derivations on a system with recursive-nix enabled crafts a build that, during the path restoration phase, races the nix-daemon by atomically replacing a target path entry with a symlink pointing to a sensitive location on the host filesystem (e.g., a cron file or daemon configuration). If the race is won before the daemon's open() with O_TRUNC resolves, the daemon creates or truncates that external file to zero bytes using its elevated permissions. No public exploit code has been identified, and the high-complexity race requirement makes reliable exploitation difficult without precise timing control.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

nix < 2.35.0

Affected Packages

euvd nix fix: 2.35.0

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

Vendor (GitHub_M) PRIMARY 2.8 LOW
AV:L/AC:H/PR:L/UI:N/S:C/C:N/I:L/A:N
vuln.today AI 2.8 LOW

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.

3.1 AV:L/AC:H/PR:L/UI:N/S:C/C:N/I:L/A:N
4.0 AV:L/AC:H/AT:P/PR:L/UI:N/VC:N/VI:N/VA:N/SC:N/SI:L/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

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

Lifecycle Timeline

1
Patch available
Aug 20, 2026 - 17:02 EUVD

DescriptionCVE.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

EPSS Score
0.1%
Top 100% exploitable
Prevalence
Medium
widely used Linux/Unix package manager, primarily among developers and NixOS deployments
Data Quality
6 sources
Confidence: High

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.

SignalValue
Severity LOW
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Low
Technical Impact
Partial

Priority Score

14
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +14
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

More in Nix

View all

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy