CVE-2026-61725: sevenz-rust2: decompress builds each output path as dest.join(entry.name()) with no traversal guard, allowing a crafted .7z to write files outside the destination (Zip-Slip)
Published 2026-11-20 · Updated 2026-11-20 · Also known as GHSA-qh76-45cr-8xrc
Summary
The sevenz-rust2 library is vulnerable to a Zip-Slip flaw where malicious archive entries can write files outside the target extraction directory. Users of the library who extract untrusted .7z archives must update to version 0.21.1 or later to mitigate the risk of arbitrary file write.
Who is affected
Affected deployments include any application that processes untrusted .7z archives, such as upload handlers, CI pipelines, or malware analysis tools. An attacker can craft an archive with paths containing '..' or absolute paths to overwrite critical system configuration files, cron jobs, or autostart entries, potentially leading to remote code execution.
Exploitability
The vulnerability is rated as medium severity with a base score of 6.1, requiring local access and user interaction according to the provided CVSS vector. While the base CVSS assumes local access, the maintainers note that network-based extraction of untrusted archives could escalate the risk to a higher severity score. The current EPSS score is 0.001 and there is no evidence of active exploitation via CISA KEV.
Remediation
- Upgrade the sevenz-rust2 dependency to version 0.21.1 or higher via crates.io.
- Verify that all downstream extraction logic utilizes the updated library's internal path validation.
How to check your project
- Check Cargo.lock for dependencies on sevenz-rust2 versions prior to 0.21.1.
- Inspect application code for calls to decompress, decompress_file, decompress_with_password, or decompress_file_with_password functions from the sevenz-rust2 crate.
Automated analysis of the published advisory data, generated 2026-11-21. Not human-reviewed; verify against the official advisory. How this works.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | Upgrade |
|---|---|---|---|---|
| crates.io | sevenz-rust2 |
>= 0, < 0.21.1 | 0.21.1 | cargo update -p sevenz-rust2 --precise 0.21.1 |
CVSS 3.1 vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L
| Attack vector | Local |
|---|---|
| Attack complexity | Low |
| Privileges required | None |
| User interaction | Required |
| Scope | Unchanged |
| Confidentiality | None |
| Integrity | High |
| Availability | Low |
FAQ
What is a Zip-Slip vulnerability?
A Zip-Slip vulnerability is a form of directory traversal where an archive contains file paths designed to escape the intended destination folder during extraction, potentially overwriting arbitrary files on the system.
Is this vulnerability limited to local extraction?
While the CVSS 3.1 vector identifies the attack vector as local (AV:L), the maintainers note that if an application processes untrusted archives received over a network, the risk profile significantly increases to network-accessible (AV:N).
Does this flaw affect all extraction methods in the crate?
Yes, all primary convenience entry points, including decompress, decompress_file, decompress_with_password, and decompress_file_with_password, are affected as they all route through the vulnerable decompress_impl function.
Original advisory description
References
- WEB https://github.com/hasenbanck/sevenz-rust2/security/advisories/GHSA-qh76-45cr-8xrc
- ADVISORY https://nvd.nist.gov/vuln/detail/CVE-2026-61725
- WEB https://github.com/hasenbanck/sevenz-rust2/commit/ef760b61f3535ac8b93006212aef41bfebc237eb
- PACKAGE https://github.com/hasenbanck/sevenz-rust2
Source records: GHSA-qh76-45cr-8xrc (OSV.dev) · EPSS by FIRST, 2026-11-22.