All vulnerabilities

crates.io

CVE-2026-61725

sevenz-rust2: decompress builds each output path as dest.join(entry.name()) with no traversal guard, allowing a crafted .7z to write files outside the destination (Zip-Slip)

Severity
Medium 6.1
Published
20 Nov 2026
Last changed
20 Nov 2026
Added to UpHeron
23 Nov 2026
Fixed in
0.21.1
Exploit chance
0.2% in the next 30 daysHigher than 14% of CVEs. EPSS by FIRST, 24 Nov 2026
Weakness
Path traversal (CWE-22)Relative path traversal (CWE-23)
Attack
Needs local access · No login needed · Needs someone to click or open something
Attacker can
Change data · Slow it down
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L
Also known as
GHSA-qh76-45cr-8xrc
Sources
OSV.dev and GitHub

Description

Extracting an attacker-supplied 7z archive can write files outside the destination directory. The 7z header stores each entry's path as a UTF-16 name with nothing constraining it to a relative, in-tree path. The extractor joins that name onto the destination and writes to the result without normalizing it or checking that it stays under the destination root, so an entry named ../../etc/cron.d/x or an absolute path escapes the target.

In src/util/decompress.rs, decompress_impl computes the per-entry destination directly (line 140):

default_entry_extract_fn (line 154) then acts on that path:

There is no normalization, no dest_path.starts_with(dest) check, and no symlink-entry handling. Path::join discards the base when the joined component is absolute, and .. components are not collapsed against the base.

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Affected software

SoftwareAffected versions
sevenz-rust2crates.io · osv:crates.io:sevenz-rust2
  • Every version before 0.21.1

About sevenz-rust2

Downloads in the last 90 days (crates.io)
1,629,667crates.io, 24 Nov 2026
Total downloads (crates.io)
2,527,760crates.io, 24 Nov 2026

This is the only vulnerability in sevenz-rust2 in our list.

References