sevenz-rust2
CVE-2026-61725
MEDIUM
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessUpload crafted .7z to extracting service
-
DeliveryArchive entry uses ../ or absolute path
-
Exploitsafe-join absent, dest.join escapes root
-
ExecutionFile::create writes outside destination
-
PersistOverwrite cron/startup/config file
-
ImpactScheduled execution runs attacker payload
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK
2 techniques across 2 tactics: Discovery, Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires that the application call one of the default convenience entry points - decompress, decompress_file, decompress_with_password, or decompress_file_with_password (which route through decompress_impl with default_entry_extract_fn) - on an attacker-controlled .7z archive on sevenz-rust2 <= 0.21.0. No special library configuration or feature flag is needed; the default extraction path is vulnerable. The archive must contain an entry whose UTF-16 name includes parent-directory ('..') components or an absolute/drive-prefixed path (e.g. '../../../../tmp/pwned' or 'C:\Windows\Temp\pwned'). The limiting factor is that the victim application must actually extract the untrusted archive: for manual desktop extraction this is the UI:R the NVD vector reflects, whereas upload-handling backends, malware sandboxes, CI pipelines, and mod/game installers that auto-unpack supplied archives satisfy this with no user interaction. Impact also depends on a writable, security-relevant target file (cron, startup/autostart, config, or build artifact) existing with appropriate permissions for the extracting process to escalate the write to code execution. |
| Impact | This is a genuine but conditional-risk arbitrary-file-write (Zip-Slip/CWE-22) in the sevenz-rust2 Rust crate, and the signals must be read against each other rather than taken at the raw 6.1 face value. The NVD CVSS 3.1 vector (AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L) models the flaw as locally triggered, requiring a user to extract an archive, with high integrity impact and no confidentiality loss - a MEDIUM rating. However, this conflicts with the vulnerability's actual trust boundary: the GHSA advisory and description both state the exposure is highest for backends that automatically unpack uploaded/untrusted .7z files, and the maintainer explicitly recommends re-scoring network-facing consumers as AV:N/UI:N (~8.6, HIGH). So the headline 6.1 understates risk for the exact deployments that matter most (upload handlers, malware sandboxes, CI steps, mod/game installers), while overstating it for a desktop user manually extracting a trusted file. No CISA KEV listing and no EPSS score are present in the input, so there is no evidence of active or at-scale exploitation; the vuln.today Decision label is 'this_month' (a near-term, not emergency, priority). A public PoC reference exists in the GHSA advisory (step-by-step archive construction); it is not verified as working exploit code. Net: real priority for anyone extracting untrusted 7z archives, lower urgency where only trusted archives are processed. The AV discrepancy (NVD AV:L vs. advisory-recommended AV:N) should be resolved against your specific deployment - verify whether your application unpacks network-supplied archives. |
| Exploit ScenarioDerived | An attacker uploads a crafted .7z archive to an application that automatically extracts it with sevenz-rust2's default decompress API; the archive contains an entry named like '../../../../etc/cron.d/x' or an absolute path, which escapes the destination directory and overwrites a writable cron, startup, autostart, config, or build file. On the next scheduled or triggered execution of that file the attacker's content runs, converting the file write into code execution or persistence. A public PoC reference exists in the GHSA advisory (it is not verified as working exploit code); exploitation requires the victim application to extract the attacker-supplied archive (UI:R in the NVD vector), which is implicit for auto-unpacking backends. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 30, 2026
Arbitrary file write outside the extraction directory in sevenz-rust2 0.21.0 and earlier allows an attacker-controlled .7z archive to overwrite files on the host when an application uses the crate's default extraction APIs such as decompress_file. The issue is a Zip-Slip path traversal (CWE-22) fixed in 0.21.1; a public PoC reference exists in the GHSA advisory but is not verified as working exploit code, and no CISA KEV entry or confirmed active exploitation is reported. NVD assigns 6.1 with AV:L/UI:R, while the independent assessment applies AV:N/UI:N to services that automatically unpack uploaded archives, so exposure is highest in upload-handling backends, malware-analysis sandboxes, CI pipelines, and mod/game installers.
RemediationAI
Vendor-released patch: upgrade to sevenz-rust2 0.21.1, which contains commit ef760b61f3535ac8b93006212aef41bfebc237eb and adds safe_join plus rejection of parent-directory, root, and drive-prefix entry names before extraction. If immediate upgrade is not possible, pre-validate archive entry names and reject any containing ParentDir, RootDir, or Prefix components, or canonicalize the joined path and verify it starts_with the destination before writing; do not rely on the default convenience APIs for untrusted archives until patched. The advisory also recommends rejecting or explicitly opting in to symlink entries, since symlink-entry handling is absent. References: https://github.com/hasenbanck/sevenz-rust2/security/advisories/GHSA-qh76-45cr-8xrc and https://github.com/hasenbanck/sevenz-rust2/commit/ef760b61f3535ac8b93006212aef41bfebc237eb.
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
sevenz-rust2 is a Rust-native 7z compressor and decompressor. In src/util/decompress.rs, decompress_impl computes each destination with dest.join(entry.name()), where entry.name() is derived from the archive's UTF-16 FilesInfo entry name; Path::join does not collapse '..' components and discards the destination when the joined component is absolute. default_entry_extract_fn then calls File::create on that path, and the default convenience entry points decompress, decompress_file, decompress_with_password, and decompress_file_with_password all route through this code. The root cause is CWE-22 path traversal: no normalization, no starts_with(dest) containment check, and no symlink-entry handling. The fix in commit ef760b61f3535ac8b93006212aef41bfebc237eb adds safe_join, normalizes backslashes to catch Windows-style names on every platform, rejects ParentDir, RootDir, and Prefix components, and also rejects parent-directory components in default_entry_extract_fn. The CVSS vector is PR:N, so the flaw is unauthenticated; exploitation still requires the application to extract an attacker-controlled archive and a writable security-relevant target file to escalate the write to code execution or persistence. The vuln.today decision label is this_month.
Know when Rust gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L
Realistic path is auto-unpacking of network-supplied archives (AV:N/UI:N/PR:N/AC:L); arbitrary file write gives I:H with incidental A:L and no read, so C:N.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
DescriptionCVE.org
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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Affected Products (CPE)CVE.org
Command injection via Windows CreateProcess argument parsing affects multiple language runtimes and tooling (Node.js, PH
In the standard library in Rust before 1.52.0, a double free can occur in the Vec::from_iter function if freeing the ele
In the standard library in Rust before 1.52.0, the Zip implementation can report an incorrect size due to an integer ove
Stored cross-site scripting and open redirect in Warpgate's SSO endpoints (versions prior to 0.25.5) allow an unauthenti
library/std/src/net/parser.rs in Rust before 1.53.0 does not properly consider extraneous zero characters at the beginni
Denial of service in the Vector observability pipeline's `logstash` source (versions 0.15.0 through 0.56.x) allows a rem
The Rust Programming Language Standard Library 1.34.x before 1.34.2 contains a stabilized method which, if overridden, c
Use-after-free in librsvg during rendering of crafted SVG documents with nested XInclude directives and duplicate entity
In the standard library in Rust before 1.52.0, the Zip implementation calls __iterator_get_unchecked() more than once fo
In the standard library in Rust before 1.50.0, read_to_end() does not validate the return value from Read in an unsafe c
Cargo prior to Rust 1.26.0 may download the wrong dependency if your package.toml file uses the `package` configuration
A parser differential in the Rust `zip` crate (zip2) through 9.0.4 lets a crafted archive present different filenames to
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB