CVE-2026-61725
Received Received - Intake

Path Traversal in sevenz-rust2

Vulnerability report for CVE-2026-61725, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-10-30

Last updated on: 2026-10-30

Assigner: GitHub, Inc.

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-10-30
Last Modified
2026-10-30
Generated
2026-10-31
AI Q&A
2026-10-31
EPSS Evaluated
N/A
NVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
hasenbanck sevenz-rust2 < 0.21.1

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-23 The product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize sequences such as ".." that can resolve to a location that is outside of that directory.
CWE-22 The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability is in sevenz-rust2, a Rust library for compressing and decompressing 7z archives. Prior to version 0.21.1, it fails to properly validate archive entry paths, allowing an attacker to write or overwrite files outside the intended destination directory. This occurs because the library does not normalize UTF-16 entry names or check if paths remain within bounds.

Detection Guidance

Detecting this vulnerability requires checking if sevenz-rust2 versions prior to 0.21.1 are installed. Use commands like 'cargo list --package sevenz-rust2' in Rust projects or inspect dependency files (Cargo.toml) for versions below 0.21.1.

Impact Analysis

An attacker could exploit this to overwrite critical system files like configuration, startup scripts, or cron jobs. This may lead to arbitrary code execution or persistence on the system. The vulnerability affects applications that automatically unpack untrusted archives, such as file upload handlers.

Mitigation Strategies

Immediately update sevenz-rust2 to version 0.21.1 or later. If using Rust projects, run 'cargo update -p sevenz-rust2'. For applications handling untrusted archives, validate extraction paths to prevent directory traversal.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-61725. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart