NixOS Nix
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).
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 2.24.4, < 2.28.7
- >= 2.29.0, < 2.29.4
- >= 2.30.0, < 2.30.5
- >= 2.31.0, < 2.31.5
- >= 2.32.0, < 2.32.8
- >= 2.33.0, < 2.33.6
- >= 2.34.0, < 2.34.7
Fixed in 2.28.7, 2.29.4, 2.30.5, 2.31.5, 2.32.8, 2.33.6, 2.34.7
- >= 2.93.0, < 2.93.4
- >= 2.94.0, < 2.94.2
- >= 2.95.0, < 2.95.2
Fixed in 2.93.4, 2.94.2, 2.95.2
Mitigation
Upgrade Nix to 2.28.7 or 2.29.4 or 2.30.5 or 2.31.5 or 2.32.8 or 2.33.6 or 2.34.7 or later.
Upgrade Lix to 2.93.4 or 2.94.2 or 2.95.2 or later.
References
- Vendor advisory github.com/NixOS/nix/security/advisories/GHSA-…
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.