Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconGain local user access
-
DeliveryCraft malicious NAR archive
-
ExploitSubmit to nix-daemon
-
InstallTrigger unbounded recursion
-
C2Overflow coroutine stack to heap
-
ExecuteBypass ASLR via information leakage
-
ImpactOverwrite heap memory structures
-
Step 8Achieve code execution as root
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Recursion depth limits
|
| Exploitation Conditions | Exploitation requires local system access with permissions to connect to nix-daemon, which by default is granted to all users in multi-user Nix installations (configurable via allowed-users in /etc/nix/nix.conf). The attacker must be able to submit maliciously crafted NAR archives for processing by the daemon, achievable through normal Nix operations like nix-store --import, nix copy, or build processes that reference malicious inputs. Multi-user installation mode is required for privilege escalation impact-single-user installations where the daemon runs as the invoking user are not vulnerable to privilege boundary crossing. Successful exploitation demands bypassing ASLR (Address Space Layout Randomization), which increases attack complexity but is feasible for local attackers with repeated attempts or information leakage vectors. The target system must be running vulnerable versions (Nix 2.24.4-2.34.6 or Lix 2.93.0-2.95.1) with the coroutine-based NAR parser. Exploitation is limited by the AC:H (high complexity) rating due to ASLR bypass requirements and precise heap manipulation needed for reliable code execution. |
| Impact | Real-world risk is significant but nuanced. The CVSS score of 7.5 (High) reflects local attack vector with high complexity (AC:H) requiring low privileges (PR:L) but achieving cross-scope impact (S:C) with high confidentiality and integrity breach. The AC:H rating accounts for ASLR bypass requirements, making exploitation non-trivial but achievable by skilled attackers. EPSS exploitation probability data is not provided, but the vendor's coordinated disclosure via GHSA, NixOS Discourse, and oss-security mailing lists indicates serious treatment. The attack requires local access and allowed-users daemon permissions (default: all system users), limiting exposure compared to network-based vulnerabilities. However, the privilege escalation from unprivileged user to root represents complete system compromise. Multi-user Nix installations in shared environments (build farms, CI/CD infrastructure, multi-tenant development servers) face elevated risk. Single-user installations where the daemon runs as the user account are not vulnerable to privilege escalation. No CISA KEV listing or public POC is identified at time of analysis, suggesting exploitation remains theoretical or targeted. The complexity of crafting NAR archives to precisely control stack overflow makes automated exploitation unlikely, consistent with SSVC framework assessment of low automatability but high technical impact. Priority should be given to patching multi-user daemon installations, particularly those accessible to untrusted local users. |
| Exploit ScenarioDerived | A malicious developer with local access to a shared build server running multi-user Nix submits a build job containing a specially crafted NAR archive with deeply nested directory structures. When nix-daemon (running as root) parses this archive, unbounded recursion exhausts the coroutine stack without triggering guard page protections. The attacker leverages ASLR bypass techniques (e.g., heap spraying combined with information leakage from timing side-channels or shared libraries) to precisely overwrite heap memory with malicious data structures. This corrupts daemon control flow to execute arbitrary code as root, granting the attacker complete control over the build infrastructure, access to secrets in the Nix store, and ability to inject backdoors into all subsequent package builds. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 05, 2026
Stack-to-heap overflow in Nix and Lix daemon's NAR parser enables local privilege escalation to root in multi-user installations. Low-privileged users with daemon access can trigger unbounded recursion in the coroutine-based parser to overwrite heap memory and achieve arbitrary code execution as the Nix daemon (root), provided ASLR can be bypassed. Vulnerability affects Nix 2.24.4-2.34.6 and Lix 2.93.0-2.95.1, with vendor-confirmed patches released across multiple version branches. CVSS vector indicates local attack with high complexity but cross-scope privilege escalation, consistent with the EPSS score suggesting targeted exploitation scenarios rather than mass scanning.
RemediationAI
Immediately upgrade to patched versions: For Nix, upgrade to 2.34.7, 2.33.6, 2.32.8, 2.31.5, 2.30.5, 2.29.4, or 2.28.7 depending on your current major/minor branch. For Lix, upgrade to 2.95.2, 2.94.2, or 2.93.4. Patches are available via normal distribution channels (nixpkgs, system package managers, or direct installation from https://nixos.org). If immediate patching is not feasible, restrict nix-daemon access by modifying the allowed-users configuration in /etc/nix/nix.conf to limit daemon connections to only trusted administrative users rather than the default of all system users-this significantly reduces attack surface but breaks workflows requiring unprivileged Nix operations. Alternatively, convert multi-user installations to single-user mode on systems where all users are equally trusted, though this eliminates the shared store benefits and may require significant reconfiguration. For high-security environments, consider running Nix operations in isolated containers or VMs until patching is complete. Review audit logs for suspicious NAR file processing or unexpected daemon activity, though exploitation may be difficult to detect post-facto. The allowed-users restriction trades off convenience for security and may disrupt CI/CD pipelines or development workflows.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages 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 exists in the NAR (Nix Archive) format parser, a critical component of both Nix and Lix package managers used for serializing filesystem objects. The parser runs on a coroutine stack allocated without guard pages-a memory protection mechanism that normally triggers faults on overflow. When processing maliciously crafted NAR archives with deeply nested structures, unbounded recursion exhausts the coroutine stack, causing it to overflow into adjacent heap memory. This is a CWE-674 (Uncontrolled Recursion) vulnerability that manifests as memory corruption. In multi-user Nix installations, the nix-daemon process runs with root privileges to manage the shared /nix/store, making it a high-value target. The coroutine implementation detail is specific to the asynchronous I/O architecture introduced in Nix 2.24.4 and Lix 2.93.0, explaining why earlier versions are unaffected. ASLR (Address Space Layout Randomization) bypass is required for reliable exploitation, but local attackers often have sufficient information leakage vectors to defeat ASLR.
Know when the next one hits your stack
- 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:H/I:H/A:N
Primary rating from Vendor (mitre).
CVSS VectorVendor: mitre
Lifecycle Timeline
1DescriptionCVE.org
An issue was discovered in Nix before 2.34.7 and Lix before 2.95.2. Unbounded recursion in the NAR (Nix Archive) parser could lead to a stack-to-heap overflow when the parser is run on a coroutine stack. The stack is allocated without a guard page, which means that a stack overflow could overwrite memory on the heap and could allow arbitrary code execution as the Nix daemon (run as root in multi-user installations) if ASLR hardening is bypassed. This can be exploited by all users able to connect to the daemon (e.g., in Nix, this is configurable via the allowed-users setting, defaulting to all users). The fixed versions are 2.34.7, 2.33.6, 2.32.8, 2.31.5, 2.30.5, 2.29.4, and 2.28.7 for Nix (introduced in 2.24.4); and 2.95.2, 2.94.2, and 2.93.4 for Lix (introduced in 2.93.0).
Executive ViewAI
A stack-to-heap overflow in the Nix and Lix daemon NAR parser allows local users to escalate privileges to root on multi-user installations, creating a direct path for unauthorized system takeover. Organizations running Nix 2.24.4 through 2.34.6 or Lix 2.93.0 through 2.95.1 face risk of complete system compromise if local access controls are insufficient. Immediate patching is critical for any environment where untrusted users have local access to these package managers.
Vendor-released patch available. Until patching: (1) Restrict daemon access via Nix configuration to trusted users only; (2) disable multi-user mode if operationally feasible; (3) implement kernel ASLR enforcement (if not already enabled) to increase exploitation complexity; (4) monitor and audit local user activity on systems running affected versions; (5) segment networks to limit lateral movement from compromised daemons.
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
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Related Vulnerabilities in Nix Path Traversal and Recursion Issues
View all 2Same weakness CWE-674 – Uncontrolled Recursion
View allVendor StatusVendor
SUSE
Severity: High| Product | Status |
|---|---|
| openSUSE Tumbleweed | Fixed |
EUVD-2026-27163
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB