Skip to content
OpenAdvisories
Low · 3.6 CVE-2024-38531 EUVD-2024-37395

Nix sandbox escape

Published Jun 28, 2024 · Updated Aug 2, 2024 · Assigned by GitHub_M

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.

Affected products

VendorProductAffectedFixed
NixOS nix >= 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 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 nix 2.23.3+dfsg-1 —
Debian 13 nix 2.23.3+dfsg-1 —
Debian 12 nix No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu Pro 24.04 LTS nix 2.18.1+dfsg-1ubuntu5+esm2 USN-7633-1
Ubuntu Pro 22.04 LTS nix 2.6.0+dfsg-3ubuntu0.1~esm1 USN-7633-1

Advisories 1

References