Every CVE Search/ Get API key

CVE-2024-38531

Nix sandbox escape

3.6 LowFix available

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.

Attack profile

How easy it is to exploit

Attack vector
Local
Complexity
High
Privileges needed
Low
User interaction
None

What an attacker can affect

Confidentiality
None
Integrity
Low
Availability
Low

Exploit likelihood

0.14%Up 0.1 points since Jun 29, 2024
90%50%10%1%

What each source reports

CVE List Score used 3.6

Nix sandbox escape

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.

Record
CVE-2024-38531
CVSS 3.1
3.6 LowCVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:L
Weakness
CWE-278
Updated
2026-11-02
EUVDEUVD-2024-37395 3.6

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.

Record
EUVD-2024-37395
CVSS 3.1
3.6 LowCVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:L
Updated
2026-11-03
NVD 3.6

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.

Record
CVE-2024-38531
CVSS 3.1
3.6 LowCVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:L
Weakness
CWE-278
Updated
2026-11-02
OSV 3.6

Nix sandbox escape

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.

Record
CVE-2024-38531
CVSS 3.1
3.6 LowCVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:L
Weakness
CWE-278
Updated
2026-11-02
OSVDEBIAN-CVE-2024-38531 3.6

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.

Record
DEBIAN-CVE-2024-38531
CVSS 3.1
3.6 LowCVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:L
Updated
2026-11-02
OSVUBUNTU-CVE-2024-38531 3.6

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.

Record
UBUNTU-CVE-2024-38531
CVSS 3.1
3.6 LowCVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:L
Updated
2026-11-02
OSVUSN-7633-1 No score

nix vulnerabilities

Linus Heckemann discovered that Nix did not correctly handle certain binaries. An attacker could possibly use this issue to execute arbitrary code. (CVE-2024-38531)

Pierre-Etienne Meunier discovered that Nix did not correctly handle TLS certificates. A remote attacker could possibly use this issue to leak sensitive information. (CVE-2024-47174)

It was discovered that Nix did not correctly handle Unix sockets. An attacker could possibly use this issue execute arbitrary code. This issue only affected Ubuntu 24.04 LTS. (CVE-2024-27297)

It was discovered that Nix did not correctly handle unpacking Nix archives (NARS). If a user or automated system were tricked into opening a specially crafted file, an attacker could possibly use this issue to cause a denial of service or execute arbitrary code. (CVE-2024-45593)

Record
USN-7633-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
nix
Debian:12
All versions, plus listed versions
2.16.1+dfsg-12.16.1+dfsg-22.16.1+dfsg-32.17.1+dfsg-12.18.1+dfsg-1
Show 16 moreShow less
2.22.1+dfsg-12.23.3+dfsg-12.23.3+dfsg-22.24.12+dfsg-12.24.8+dfsg-12.24.9+dfsg-12.24.9+dfsg-22.25.4+dfsg-12.26.3+dfsg-12.32.5+dfsg-12.32.5+dfsg-22.34.3+dfsg-12.34.6+dfsg-12.34.8+dfsg-12.35.4+dfsg-12.8.0-1.1
None known
nix
Debian:13
before 2.23.3+dfsg-1
2.23.3+dfsg-1
nix
Debian:14
before 2.23.3+dfsg-1
2.23.3+dfsg-1
nix
Ubuntu:Pro:22.04:LTS
before 2.6.0+dfsg-3ubuntu0.1~esm1, plus listed versions
2.3.10+dfsg1-12.3.10+dfsg1-1build12.6.0+dfsg-22.6.0+dfsg-3
2.6.0+dfsg-3ubuntu0.1~esm1
nix
Ubuntu:Pro:24.04:LTS
before 2.18.1+dfsg-1ubuntu5+esm2, plus listed versions
2.16.1+dfsg-3ubuntu12.18.1+dfsg-1ubuntu12.18.1+dfsg-1ubuntu22.18.1+dfsg-1ubuntu42.18.1+dfsg-1ubuntu5
2.18.1+dfsg-1ubuntu5+esm2
nix
Ubuntu:Pro:22.04:LTS
From an advisory covering 4 CVEs
before 2.6.0+dfsg-3ubuntu0.1~esm1, plus listed versions
2.3.10+dfsg1-12.3.10+dfsg1-1build12.6.0+dfsg-22.6.0+dfsg-3
2.6.0+dfsg-3ubuntu0.1~esm1
nix
Ubuntu:Pro:24.04:LTS
From an advisory covering 4 CVEs
before 2.18.1+dfsg-1ubuntu5+esm2, plus listed versions
2.16.1+dfsg-3ubuntu12.18.1+dfsg-1ubuntu12.18.1+dfsg-1ubuntu22.18.1+dfsg-1ubuntu42.18.1+dfsg-1ubuntu5
2.18.1+dfsg-1ubuntu5+esm2

History

History
RecordedChangedSources
affected, facts
aliases, publishedEUVD
first indexedCVE List, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2024-38531 is a low vulnerability (CVSS 3.6) in Nixos Nix, published June 28, 2024. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.14%, the 3rd percentile. Fixed in nix 2.23.3+dfsg-1.

References

Show 5 moreShow less
MoveEnter Open