sevenz-rust2: unchecked 7z entry paths permit traversal and absolute-path file overwrites
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- How many real-world setups can hit the bug, from the vendor's advisory and CISA data. It does not know your setup.What do these mean? →
- Specific setups only
- Fix
- Fixed in 0.21.1
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
The sevenz-rust2 Rust library, which compresses and extracts 7z archives, is affected. When an application extracts a maliciously crafted 7z archive, files can be written or overwritten outside the intended destination folder, potentially including configuration, startup, or build files that could lead to code execution or persistence.
Summarized by anthropic/claude-haiku-5.5. Verify details against the original sources.
Read the original description
sevenz-rust2 is a Rust-native 7z compressor and `decompress`or. Prior to 0.21.1, extracting an attacker-supplied 7z archive can write or overwrite files outside the destination directory. In `src/util/decompress.rs`, `decompress_impl` computes each destination with `dest.join(entry.name())` without normalizing the archive's UTF-16 entry name or verifying containment, and `default_entry_extract_fn` writes to it with `File::create`. Parent-directory components escape the extraction root, and an absolute entry path makes the join discard the destination entirely. The convenience entry points `decompress`, `decompress_file`, `decompress_with_password`, and `decompress_file_with_password` all use this default path. Overwriting writable configuration, startup, cron, or build files can lead to code execution or persistence. The archive bytes are the attacker-controlled trust boundary, including for applications that automatically unpack uploaded or otherwise untrusted archives. This issue is fixed in version 0.21.1.
Timeline
- CVE published
- First seen by cve.now
Affected versions
- hasenbanck sevenz-rust2
fixed in 0.21.1
References 2
GitHub · hasenbanck/sevenz-rust2
Questions about CVE-2026-61725
What does this mean?
sevenz-rust2 does not check the paths of entries in 7z archives, so an archive can name files outside the intended extraction directory, including absolute paths. The advisory says this can overwrite config, cron, autostart or build files and can escalate to code execution.Source: github.com
Am I affected, and how do I check?
The fixed range lists versions before 0.21.1 of the sevenz-rust2 crate. No specific setup conditions are listed. To check a project, look at the sevenz-rust2 version in Cargo.lock or in the output of cargo tree.Source: github.com
What should I do about it?
Upgrade sevenz-rust2 to 0.21.1 or later, the crates.io release that includes commit ef760b6.Source: github.com
Is it being exploited?
It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.Source: cve.now feed data