Description
Nix is a package manager for Linux and other Unix systems. A bug in Nix 2.24 prior to 2.24.6 allows a substituter or malicious user to craft a NAR that, when unpacked by Nix, causes Nix to write to arbitrary file system locations to which the Nix process has access. This will be with root permissions when using the Nix daemon. This issue is fixed in Nix 2.24.6.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| NixOS | nix | >= 2.24.0, < 2.24.6 | — |
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.
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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
- USN-7633-1 nix vulnerabilities Ubuntu Security Notices (USN) · Apr 27, 2026