nix-nar: Path traversal
Severity and exploitation
KEV coverage does not rule out exploitation.
Assessment vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:NSeverity
high7.5CVSS measures technical severity, not the likelihood of an attack.
Known exploitation
KEV status unavailable or stale
Absence from CISA KEV does not rule out attacks.
Public exploit
Not established by this record
Missing evidence does not mean no public exploit exists.
Remediation
Package fixes recorded
Fix versions are recorded for 1 of 1 mapped packages. Check each release branch and any separate product guidance.
What this means
Decoder::unpack does not safely contain the paths it extracts, so a malicious NAR archive can create files outside the destination directory — a path traversal (CWE-22).
Source excerpt · OSVAttack conditions
No attack-condition excerpt has been identified here. Review the full source description and references for authentication, network access, and configuration requirements.
Review supporting sources →Affected versions
Check the exact model, release, and any platform requirements against your installation.
Packages
Compare each installed version with the publisher’s affected ranges. Where a fix is recorded, choose the appropriate release branch and test compatibility before upgrading.
| Affected range | Recorded fix |
|---|---|
| From 0.0.0-0 before 0.6.0Semantic versions | 0.6.0 |
Version evidence: OSV · RUSTSEC-2026-0425
View original version evidence (0 explicit versions)
What to do
Compare your installed product and version with the affected versions above. A matching product name alone does not confirm exposure.
Use the recorded fix for your release branch. Review the publisher’s instructions and test compatibility before upgrading.
cve.new guidance unless attributed to a publisher. This page does not inspect your installation.
Public exploit evidence
No public exploit reference is identified in the imported evidence. This is not a claim that no exploit exists.
Original source description
Read the full publisher description
`nix-nar`: `Decoder::unpack` writes archive entries outside the destination directory (path traversal)
Decoder::unpack does not safely contain the paths it extracts, so a malicious NAR
archive can create files outside the destination directory — a path traversal
(CWE-22).
In src/dec.rs (Decoder::unpack):
- A symlink entry's target is written without checking where it points
(
src/dec.rs:153), so the archive can create a symlink that escapes the destination directory. - The out-of-destination containment check compares path strings only and does
not account for symlinks created earlier in the same unpack
(
src/dec.rs:176-181), before reaching the write sinks (std::fs::create_diratsrc/dec.rs:201andOpenOptions::openatsrc/dec.rs:218). - The parser also accepts entry names containing
/(src/parser.rs:138-147).
Combined, a malicious archive can include a symlink a pointing at an external
directory and then an entry named a/b, causing b to be written to
<external>/b, outside the destination. This can create new files anywhere the
process can write (it cannot overwrite existing files), which is escalatable to code
execution by planting files in attacker-chosen locations.
References
3 sourcesInside the record
Evidence available
Describes the evidence in this view, not whether the product is safe.
Original records
No official CVE record has been imported. Use the source links below for the original advisory.
cve.new JSON →Timeline
All times UTCSource updated
Latest modification date supplied by the source.
Last imported by cve.new
Latest catalog import, not the date we first saw this advisory.
Advisory published
Publication date supplied by the source.
What changed
Follow changesLarge field values are marked as truncated previews. Original source snapshots remain retained.