CVE-2024-45593CWE-22

Nix affected by unsafe NAR unpacking

Critical · published September 10, 2024

CVSS v3.1
9.1
EPSS
1%
Percentile
48.1
In the wild
Unconfirmed
What it is

🔥 A crafty NAR could have Nix writing files wherever it wants! With versions up to 2.24.5, this vulnerability lets mischief-makers exploit your system like a sneaky burglar slipping a note through the mailbox. ⚡ Think of Nix as a chef in a busy restaurant kitchen. If a rogue delivery person sneaks in a tainted package that the chef doesn’t inspect, they might unwittingly mix in something dangerous with the ingredients, leading to chaos in the kitchen—just like Nix can be tricked into writing files in unwanted locations. An attacker could create a malicious package that, when unpacked by Nix, allows them to overwrite critical files or plant malware in sensitive areas of your system. With root permissions via the Nix daemon, the potential damage is absolutely devastating, as it could compromise the entire system's integrity and security!

Put simply

Think of Nix as a chef in a busy restaurant kitchen. If a rogue delivery person sneaks in a tainted package that the chef doesn’t inspect, they might unwittingly mix in something dangerous with the ingredients, leading to chaos in the kitchen—just like Nix can be tricked into writing files in unwanted locations. This vulnerability in Nix 2.24 prior to 2.24.6 allows unauthorized file writes by crafting a NAR (Nix Archive) that, when processed, can lead to file system manipulation with elevated privileges.

What to do

An attacker could create a malicious package that, when unpacked by Nix, allows them to overwrite critical files or plant malware in sensitive areas of your system. With root permissions via the Nix daemon, the potential damage is absolutely devastating, as it could compromise the entire system's integrity and security! To protect your system, immediately upgrade Nix to version 2.24.6 or later. Regularly audit your NAR packages to ensure they come from trusted sources and avoid manual installations from unverified origins. Don't forget to review permissions associated with the Nix daemon! You've got this! A timely update and some diligence will keep your system safe and sound. 🛡️

The record
Technical detail
CVSS v3.1
9.1 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.00602 · 48.1th percentile
Weakness
CWE-22 · Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Published
2024-09-10T15:51Z
EPSS history
Timeline
  • 10 SEP 15:51Z
    Nix affected by unsafe NAR unpacking
    cvelistv5