Nix allows macOS sandbox escape via built-in builders
Key facts
- Attack vector
- Local
- Privileges required
- Low
- User interaction
- Passive
- Attack complexity
- High
- Attack requirements
- Present
- Impact type
- Security bypass
- Confidentiality · integrity · availability
- Low · Low · None
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA. Impact type from CWE-693.
Summary
Nix is a package manager for Linux and other Unix systems. On macOS, built-in builders (such as `builtin:fetchurl`, exposed to users with `import <nix/fetchurl.nix>`) were not executed in the macOS sandbox. Thus, these builders (which are running under the `nixbld*` users) had read access to world-readable paths and write access to world-writable paths outside of the sandbox. This issue is fixed in 2.18.9, 2.19.7, 2.20.9, 2.21.5, 2.22.4, 2.23.4, and 2.24.10. Note that sandboxing is not enabled by default on macOS. The Nix sandbox is not primarily intended as a security mechanism, but as an aid to improve reproducibility and purity of Nix builds. However, sandboxing *can* mitigate the impact of other security issues by limiting what parts of the host system a build has access to.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| NixOS | nix | before 2.18.9; >= 2.19.0, < 2.19.7, 2.20.9, 2.21.5, 2.22.4, 2.23.4, 2.24.10; 2.20.0 to before 2.20.9; 2.21.0 to before 2.21.5; 2.22.0 to before 2.22.4; 2.23.0 to before 2.23.4; 2.24.0 to before 2.24.10 | 2.18.9, 2.20.9, 2.21.5, 2.22.4, 2.23.4, 2.24.10 | Patch available | CNA |
- nix VendorNixOS Affected before 2.18.9; >= 2.19.0, < 2.19.7, 2.20.9, 2.21.5, 2.22.4, 2.23.4, 2.24.10; 2.20.0 to before 2.20.9; 2.21.0 to before 2.21.5; 2.22.0 to before 2.22.4; 2.23.0 to before 2.23.4; 2.24.0 to before 2.24.10 Fixed in 2.18.9, 2.20.9, 2.21.5, 2.22.4, 2.23.4, 2.24.10 Patch available CNA
Remediation
- Fix · CNA nix (NixOS) Fixed in 2.18.9, 2.20.9, 2.21.5, 2.22.4, 2.23.4, 2.24.10
Timeline
- 2026-10-02 Threatist record created from CVE-2024-51481
References
More NixOS vulnerabilities
- TI-2026-23989 crypto: algif_aead - Revert to operating out-of-place KEVCVSS 3.1HIGH 7.8
- TI-2024-11208 Rsync: heap buffer overflow in rsync due to improper checksum length handling CVSS 3.1CRITICAL 9.8
- TI-2026-19201 Tandoor Recipes module allows SQLite database to be externally accessible with the default settings CVSS 4.0HIGH 8.7
- TI-2024-11209 Rsync: info leak via uninitialized stack contents CVSS 3.1HIGH 7.5
- TI-2024-11212 Rsync: --safe-links option bypass leads to path traversal CVSS 3.1HIGH 7.5
- TI-2024-11211 Rsync: path traversal vulnerability in rsync CVSS 3.1HIGH 7.5
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences