RUSTSEC-2026-0245 — Vulnerability in sevenz-rust — Advisory Details
Relative/Absolute Path Traversal (CWE-23/CWE-36) in `decompress_impl` that enables an arbitrary file write.
Does your project use an affected sevenz-rust version?
Paste your Cargo.lock to check it for RUSTSEC-2026-0245 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
Summary
All versions of sevenz-rust fail to validate file paths when extracting in decompress_impl (the underlying function used in the exposed decompress api functions).
This oversight allows a maliciously crafted archive to extract outside the extraction directory, from both relative paths such as ../../../... or absolute paths like C:\\... or /etc/..., which could lead to file disclosure or remote command execution in combination with other flaws or social engineering.
Details
The following line numbers will be referencing the latest version v0.6.1. The specific point of failure is at de_funcs.rs::101 inside decompress_impl.
seven.for_each_entries(|entry, reader| {
let dest_path = dest.join(entry.name());
extract_fn(entry, reader, &dest_path)
})?;
When the function iterates through each entry, it blindly joins the entry name with the output directory before passing the path into extract_fn, default_entry_extract_fn unless specified otherwise by user. This allows for relative path traversal from simple path concatenation and absolute path traversal due to std::path::join's edge case where if the "[passed] path is absolute, it replaces the current path."
default_entry_extract_fn also fails to validate if the entry it is given has a safe extraction path before it writes to disk at de_funcs.rs::135.
Status
The project has been abandoned and the repository has been deleted, so no upstream fix is expected. Users should migrate away from the library in favor of a modern up-to-date 7z library such as sevenz-rust2.
Advisory Timeline
- First published August 6, 2026 (112 days ago).
- Last revised August 10, 2026 — 4 days after initial publication.
Affected Packages (1)
Affects 1 ecosystem: crates.io (1).
| Package | Fixed In |
|---|---|
| sevenz-rust crates.io · Affected: All versions | Range-based data available |
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 8.2 score means for each attack dimension.
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:N/VI:H/VA:L/SC:H/SI:H/SA:H
References
Frequently Asked Questions
- What is RUSTSEC-2026-0245?
- Relative/Absolute Path Traversal (CWE-23/CWE-36) in `decompress_impl` that enables an arbitrary file write. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 8.2/10).
- How do I check if my project is affected by RUSTSEC-2026-0245?
- RUSTSEC-2026-0245 affects sevenz-rust. Use GeekWala's free vulnerability scanner to check your dependencies against RUSTSEC-2026-0245 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Significant impact if exploited, or exploitable with modest effort.
Related CVEs
- CVE-2026-83816HIGH
CodeWhale: exec_shell parallel-readonly classifier auto-approves fd/rg/git grep exec flags enabling silent RCE
- CVE-2026-83817HIGH
CodeWhale: Automation auto_approve defaults to true, bypassing the task-path hardening fix for silent recurring agent execution