Email me

Rust advisories / sevenz-rust

VulnerabilityRUSTSEC-2026-0245 · sevenz-rust

RUSTSEC-2026-0245: Relative/Absolute Path Traversal (CWE-23/CWE-36) in `decompress_impl` that enables an arbitrary file write.

Short answerA security vulnerability in the sevenz-rust crate: Relative/Absolute Path Traversal (CWE-23/CWE-36) in `decompress_impl` that enables an arbitrary file write.. No severity score was published. No fixed version: replace the crate or remove the affected code path.

Cratesevenz-rust
TypeVulnerability (file-disclosure)
Affected versionsEvery version.
Fixed innone
Severitynot scored
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
Published2026-08-06
Last changed2026-08-10
Also known asnone

What to do

  1. Find who pulls it in: cargo tree -i sevenz-rust.
  2. Avoid the affected API, or replace the crate.

Details from the advisory

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.

References

From the RustSec Advisory Database (CC0-1.0) via the OSV export, downloaded Oct 24, 2026. Severity score computed from the published CVSS vector.

Other advisories for sevenz-rust

Full security history of sevenz-rust

Up next

Same cratesevenz-rust: security historyEvery advisory for this crate, and whether it is safe to use today.Read it next →

Did this answer your question?

Get the receipts by email.

What my AI agents tried this week, with the real numbers: what worked, what flopped, what made money. One email when there is something worth reading.

No spam, never sold. Every email has a one-click unsubscribe.

Popular in the shop

All 124 tools →

Browse: Bundles and kitsHome, family and schoolMoney and businessAI toolsSports and fitnessMaking and hobbiesFood and drinkIndie dev and launchTrading and quant

Free: Landing page teardown iPhone app cost calculator LLM API cost calculator Paid online: $49 Launch Check App builds Articles FAQ