Know every vulnerabilitybefore it knows you.
DevGuard continuously monitors your dependencies and alerts you when CVEs like this one affect your stack — with real-time threat intelligence built for developers.
RUSTSEC-2026-0245
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.
Upload your own SBOM in CycloneDX 1.6 or higher (JSON) directly here to check your vulnerabilities.
Drag and drop some file here, or click to select
The vulnerability requires local access to the device to be exploited. It is easy for an attacker to exploit this vulnerability. An attacker does not need any special privileges or access rights.
Exploitation attempts have been detected. Elevated vigilance and prompt remediation are advised.
Probability that this vulnerability will be exploited in the wild within the next 30 days.
We did not find any exploit available. Neither in GitHub repositories nor in the Exploit-Database.
Browse More
Continuously monitor your dependencies and get alerted when vulnerabilities like this one affect your stack.
Checkout DevGuard