Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessDeliver crafted ZIP with traversal entry
-
DeliveryApplication calls Zip::Entry#extract on archive
-
ExploitPrefix check passes for sibling directory path
-
ExecutionFile written outside intended extraction directory
-
PersistOverwrite script or web-accessible file
-
ImpactAttacker achieves code execution
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 target application (1) uses rubyzip's |
| Impact | The provided CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N) scoring 8.7 accurately captures the worst-case scenario: a server that automatically extracts user-supplied archives is exploitable without any authentication or user interaction, with high integrity impact via arbitrary file write. Real-world risk is strongly deployment-dependent - applications that accept archive uploads and extract them automatically into predictable directory structures (common in Rails file-management, backup, and CI/CD tooling) are directly exposed, while deployments that only extract archives from trusted internal sources face negligible risk. No EPSS data was provided in the input and the vulnerability does not appear in the CISA KEV catalog, indicating no confirmed active exploitation at time of analysis. The attack logic is simple and reliable - it requires no memory corruption or timing - so automatable exploitation is plausible against any exposed endpoint, meaning even a moderately sized organization running vulnerable rubyzip versions in a file-processing pipeline should prioritize this patch. The technical impact score is well-supported; no conflicting signals were identified between the CVSS vector and the described mechanism. |
| Exploit ScenarioDerived | An attacker uploads a ZIP archive containing an entry named |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 03, 2026
Path traversal in rubyzip before 3.4.0 allows an attacker who supplies a crafted ZIP archive to write files outside the intended extraction directory by exploiting a flawed prefix comparison in Zip::Entry#extract. The root cause is that the path guard checks extract_path.start_with?(dest_dir) without appending a trailing file separator, meaning a sibling directory sharing the destination string prefix - such as out_evil alongside destination out - passes validation and receives the extracted file. The fix is confirmed in v3.4.0; no active exploitation has been identified at time of analysis, but the attack primitive is straightforward to reproduce from the published commit diff.
RemediationAI
Upgrade rubyzip to version 3.4.0 or later, the fix release confirmed by the GitHub release tag at https://github.com/rubyzip/rubyzip/releases/tag/v3.4.0. The patching commit (17edfbf4423b83211b075acc23a7d8640da63449 at https://github.com/rubyzip/rubyzip/commit/17edfbf4423b83211b075acc23a7d8640da63449) is minimal and low-risk: it appends ::File::SEPARATOR to the destination directory in the prefix check, closing the sibling-directory escape. Where immediate upgrade is not feasible, a compensating control is to pre-validate each archive entry name using File.expand_path(entry_name, dest_dir) and reject any result that does not begin with dest_dir + File::SEPARATOR; however, application-level sanitization duplicates logic now fixed in the library and is error-prone, so upgrading is strongly preferred. Additionally, running the extraction process under a restricted OS user that lacks write permissions outside the intended extraction directory limits the blast radius if traversal occurs.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in rubygems
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The vulnerability exists in lib/zip/entry.rb within the Zip::Entry#extract method of rubyzip (CPE: cpe:2.3:a:rubyzip:rubyzip:*:*:*:*:*:*:*:*), a widely-used pure-Ruby library for reading and writing ZIP archives. The root cause is CWE-22 (Path Traversal) expressed as a prefix-comparison pitfall: the guard unless extract_path.start_with?(dest_dir) allows any path that begins with the destination directory string to pass, including sibling directories that happen to share the same prefix characters. For example, with destination /app/uploads/out, an archive entry resolving to /app/uploads/out_evil/backdoor.sh satisfies the check because the string starts with /app/uploads/out. The fix in commit 17edfbf4423b83211b075acc23a7d8640da63449 changes the condition to extract_path.start_with?(dest_dir + ::File::SEPARATOR) || dest_dir == ::File::SEPARATOR, ensuring only paths strictly nested under the destination subtree are permitted. A regression test with a crafted out_evil.zip fixture was added alongside the fix.
Know when Rubyzip 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
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N
Network-delivered archive enables unauthenticated arbitrary file write with no confidentiality or availability impact in the direct vulnerability.
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
rubyzip versions before 3.4.0 contain a path traversal vulnerability in Zip::Entry#extract that fails to properly validate extraction paths using prefix comparison without trailing separators. Attackers can craft archive entries with names like ../upload_backup/owned.sh to write files outside the intended extraction directory into sibling paths sharing the destination prefix.
Executive ViewAI
Ruby applications using rubyzip before 3.4.0 can be compromised via maliciously crafted ZIP archives that bypass extraction safeguards and write files to arbitrary system locations. The vulnerability affects any organization using ZIP file processing for uploads, backups, or data handling and carries high severity (CVSS 8.7). A vendor patch (rubyzip 3.4.0) is available and should be deployed immediately.
Apply vendor patch.
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.
rubyzip gem rubyzip version 1.2.1 and earlier contains a Directory Traversal vulnerability in Zip::File component that c
The Zip::File component in the rubyzip gem before 1.2.1 for Ruby has a directory traversal vulnerability. Rated critical
In Rubyzip before 1.3.0, a crafted ZIP file can bypass application checks on ZIP entry sizes because data about the unco
Same weakness CWE-22 – Path Traversal
View allSame technique Path Traversal
View allVendor StatusVendor
SUSE
Severity: Important| Product | Status |
|---|---|
| SUSE Linux Enterprise Module for Package Hub 15 SP7 | Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP5 | Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP6 | Affected |
| openSUSE Leap 15.3 | Affected |
| openSUSE Leap 15.4 | Affected |
| openSUSE Leap 15.5 | Affected |
| openSUSE Leap 15.6 | Affected |
EUVD-2026-70673
GHSA-47m2-wp7j-p9vc
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB