CVE-2024-38531: Nix sandbox escape

Published Jun 28, 2024
·
Updated

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.

Affected Software

1 affected component
Nix Nix package manager<2.18.4, >=2.19.5<=2.22.2, >=2.22.2<=2.23.1

Event History

Jun 28, 2024
CVE Published
via MITRE·01:18 PM
Data Sourced
via MITRE·01:18 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·02:15 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

What is the severity of CVE-2024-38531?

CVE-2024-38531 has been rated as high severity due to the potential for privilege escalation through setuid binaries.

2

How do I fix CVE-2024-38531?

To mitigate CVE-2024-38531, upgrade Nix package manager to version 2.18.4 or above, or ensure that setuid binaries are not created in globally accessible locations.

3

What versions of Nix are affected by CVE-2024-38531?

CVE-2024-38531 affects Nix package manager versions earlier than 2.18.4 and versions between 2.19.5 and 2.22.2 as well as between 2.22.2 and 2.23.1.

4

What vulnerabilities does CVE-2024-38531 exploit?

CVE-2024-38531 exploits a flaw in permissions management within the build directory of Nix, allowing for unauthorized privilege escalation.

5

Who is impacted by CVE-2024-38531?

Users of the Nix package manager on Linux and Unix systems are primarily impacted by CVE-2024-38531.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203