CVE-2024-38531 json
Nix sandbox escape
published 2024-06-28 2 y ago modified 2026-06-17 4 mo ago also EUVD-2024-37395
- cvss
- 3.6
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.1%
- EPSS 0.1% chance of exploitation in 30 days, percentile 3%
- public exploits
- 0
- none known
Summary
Nix is a package manager for Linux and other Unix systems that makes package management reliable and reproducible. A build process has access to and can change the permissions of the build directory. After creating a setuid binary in a globally accessible location, a malicious local user can assume the permissions of a Nix daemon worker and hijack all future builds. This issue was patched in version(s) 2.23.1, 2.22.2, 2.21.3, 2.20.7, 2.19.5 and 2.18.4.
Patch / fix
- nixos nix 2.18.4, 2.19.5, 2.20.7, 2.21.3, 2.22.2, 2.23.1
- nix Debian 14, Debian 13 2.23.3+dfsg-1
debian advisories DEBIAN-CVE-2024-38531
- nix Ubuntu Pro 22.04 LTS 2.6.0+dfsg-3ubuntu0.1~esm1
- nix Ubuntu Pro 24.04 LTS 2.18.1+dfsg-1ubuntu5+esm2
ubuntu advisories UBUNTU-CVE-2024-38531
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- github.com/NixOS/nix#10501 pull request
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 2 y ago
Exploit prediction
0.14% chance of exploitation in the next 30 days, higher than 3% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 3.6 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:L |
Affected products
- NixOS nix
Classification
- Weakness
-
- CWE-278 Insecure Preserved Inherited Permissions
References
Sources
- CVE List CVE-2024-38531
- NVD CVE-2024-38531
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.