CVE-2026-61725
published medium CVSS 3.1 · 6.1sevenz-rust2: unchecked 7z entry paths permit traversal and absolute-path file overwrites
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| hasenbanck | — | sevenz-rust2< 0.21.1 | Affected | Not stated | GitHub_M |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 6.1 / 10
- Severity
- medium
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| hasenbanck | sevenz-rust2 | < 0.21.1 (affected) | GitHub_M · cna |
Weaknesses
2- CWE-22 CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
- CWE-23 CWE-23: Relative Path Traversal
References
2Provider assertions
2GitHub_M · cna
sevenz-rust2: unchecked 7z entry paths permit traversal and absolute-path file overwrites
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- d9ac9246122624b8ea50612b3af169dae7cea92201fb1a83e68e00eb868a16d4
- Ingested
- 02 Nov 2026, 14:52:25 UTC
- Source record
- Official CVE record