Low severity · published Jun 28, 2024
CVE-2024-38531
Nix sandbox escape
3.6
CVSS
0.1%
EPSS
No
On KEV
Description
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.
CVSS vector
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:L
Attack vector
Local
Complexity
High
Privileges
Low
User interaction
None
Confidentiality
None
Integrity
Low
Availability
Low
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.1% · higher than 4% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
NI
nix · NixOS
>= 2.23.0, < 2.23.1; >= 2.22.0, < 2.22.2; >= 2.21.0, < 2.21.3; >= 2.20.0, < 2.20.7; >= 2.19.0, < 2.19.5; >= 2.18.0, < 2.18.4 · source: vendor
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2024-38531
CVE.org
https://www.cve.org/CVERecord?id=CVE-2024-38531
github.com
https://github.com/NixOS/nix/pull/10501
github.com
https://github.com/NixOS/nix/security/advisories/GHSA-q82p-44mg-mgh5
More from nix
8.8
CVE-2024-45593
Nix affected by unsafe NAR unpacking
8.4
CVE-2026-39860
Nix sandbox escape: file write via symlink at FOD `.tmp` copy destination
8.0
CVE-2026-110450
Nix before 2.35.3 and Lix before 2.95.4 allow privilege escalation via a repair operation because it could destroy and then replace a store path before content verification
7.9
CVE-2025-53819
Nix's privilege dropping to build user broke for macOS
7.8
CVE-2019-17365
Nix through 2.3 allows local users to gain access to an arbitrary user's account because the parent directory of the user-profile directories is world writable
