Skip to main content

sevenz-rust2 CVE-2026-61725

MEDIUM
Path Traversal (CWE-22)
2026-10-30 GitHub_M
6.1
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Upload crafted .7z to extracting service
  2. Delivery
    Archive entry uses ../ or absolute path
  3. Exploit
    safe-join absent, dest.join escapes root
  4. Execution
    File::create writes outside destination
  5. Persist
    Overwrite cron/startup/config file
  6. Impact
    Scheduled 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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
No patch listed yet 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

Vendor (GitHub_M) PRIMARY 6.1 MEDIUM
AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L
vuln.today AI 8.2 HIGH

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.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
Low

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

EPSS Score
0.1%
Top 97% exploitable
Prevalence
Low
niche Rust-native 7z crate, modest production deployment footprint
Social Media
1
Sightings
Data Quality
5 sources
Confidence: Medium

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.1%
Patch available No
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation
Poc
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

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

cpe:2.3:a:hasenbanck:sevenz-rust2:*:*:*:*:*:*:*:*

More in Rust

View all
CVE-2024-3566 CRITICAL POC
9.8 Apr 10

Command injection via Windows CreateProcess argument parsing affects multiple language runtimes and tooling (Node.js, PH

CVE-2021-31162 CRITICAL POC
9.8 Apr 14

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

CVE-2021-28879 CRITICAL POC
9.8 Apr 11

In the standard library in Rust before 1.52.0, the Zip implementation can report an incorrect size due to an integer ove

CVE-2026-58491 CRITICAL POC
9.3 Sep 21

Stored cross-site scripting and open redirect in Warpgate's SSO endpoints (versions prior to 0.25.5) allow an unauthenti

CVE-2021-29922 CRITICAL POC
9.1 Aug 07

library/std/src/net/parser.rs in Rust before 1.53.0 does not properly consider extraneous zero characters at the beginni

CVE-2026-77620 HIGH POC
8.7 Sep 22

Denial of service in the Vector observability pipeline's `logstash` source (versions 0.15.0 through 0.56.x) allows a rem

CVE-2019-12083 HIGH POC
8.1 May 13

The Rust Programming Language Standard Library 1.34.x before 1.34.2 contains a stabilized method which, if overridden, c

CVE-2026-96889 HIGH POC
7.8 Sep 23

Use-after-free in librsvg during rendering of crafted SVG documents with nested XInclude directives and duplicate entity

CVE-2021-28878 HIGH POC
7.5 Apr 11

In the standard library in Rust before 1.52.0, the Zip implementation calls __iterator_get_unchecked() more than once fo

CVE-2021-28875 HIGH POC
7.5 Apr 11

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

CVE-2019-16760 HIGH POC
7.5 Sep 30

Cargo prior to Rust 1.26.0 may download the wrong dependency if your package.toml file uses the `package` configuration

CVE-2026-115905 CRITICAL
10.0 Oct 26

A parser differential in the Rust `zip` crate (zip2) through 9.0.4 lets a crafted archive present different filenames to

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy