sevenz-rust2: unchecked 7z entry paths permit traversal and absolute-path file overwrites
Impact
sevenz-rust2 versions prior to 0.21.1 are vulnerable to path traversal, allowing an attacker to overwrite files outside the destination directory when extracting a malicious 7z archive. The issue occurs due to unchecked 7z entry paths. This can lead to code execution or persistence if writable configuration files are overwritten.
Summarized by @cf/meta/llama-3.3-70b-instruct-fp8-fast. Verify details against the original sources.Affected packages
Affected products
Vendor version evidence. Product records are separate from automatic dependency matching.
hasenbanck · GitHub_M
sevenz-rust2
1 range
hasenbanck · GitHub_M
sevenz-rust2
Compare with this publisher’s ranges. This does not inspect your installation.
affected
< 0.21.1
Other versions: unknown
Original source description
sevenz-rust2 is a Rust-native 7z compressor and decompressor. 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.
Inside the record
Evidence available
Describes the evidence in this view, not whether the product is safe.
Original records
CVE-2026-61725View the latest unmodified CVE JSON from the official source. It may be newer than this imported page.
cve.new JSON →Underlying weaknesses
The source’s classification of what caused the vulnerability.
Contributing organizations · 1
Assigning organization
What changed
Follow changesLarge field values are marked as truncated previews. Original source snapshots remain retained.