# CVE-2026-61725: sevenz-rust2: unchecked 7z entry paths permit traversal and absolute-path file overwrites

- Severity: Medium 6.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.24%, higher than 15% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-06-30T12:00:00.000Z
- Modified: 2026-12-01T09:40:51.197Z
- Also known as: GHSA-qh76-45cr-8xrc, RUSTSEC-2026-0624
- Weaknesses: CWE-22, CWE-23
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: 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.

(As written by CVE List.)

## Affected

- hasenbanck sevenz-rust2: < 0.21.1
- sevenz-rust2 (crates.io): before 0.21.1; from 0.0.0-0 before 0.21.1

## Every score

- GitHub_M: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L`
- GitHub: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L`
- RustSec Advisory Database: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L`

## References

- <https://github.com/hasenbanck/sevenz-rust2/security/advisories/GHSA-qh76-45cr-8xrc> (exploit, advisory, web)
- <https://github.com/hasenbanck/sevenz-rust2/commit/ef760b61f3535ac8b93006212aef41bfebc237eb> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-61725> (advisory)
- <https://github.com/hasenbanck/sevenz-rust2> (package)
- <https://crates.io/crates/sevenz-rust2> (package)
- <https://rustsec.org/advisories/RUSTSEC-2026-0624.html> (advisory)

## Sources

- CVE List: [CVE-2026-61725](https://www.cve.org/CVERecord?id=CVE-2026-61725), CVE Terms of Use, modified 2026-11-02
- GitHub Advisory Database: [GHSA-qh76-45cr-8xrc](https://github.com/advisories/GHSA-qh76-45cr-8xrc), CC-BY-4.0, modified 2026-12-01
- RustSec Advisory Database: [RUSTSEC-2026-0624](https://rustsec.org/advisories/RUSTSEC-2026-0624.html), CC0-1.0, modified 2026-12-01
- NVD: [CVE-2026-61725](https://nvd.nist.gov/vuln/detail/CVE-2026-61725), Public domain, modified 2026-11-02

---

Page: https://cve.day/CVE-2026-61725 · Whole record: https://cve.day/CVE-2026-61725.json · Rebuilt by cve.day 2026-12-01T10:07:25.049Z
