rubyzip versions before 3.4.0 contain a path traversal vulnerability in Zip::Entry#extract that fails to properly validate extraction paths using… (CVE-2026-85396)
Description
rubyzip versions before 3.4.0 have a path traversal vulnerability in the Zip::Entry#extract method. This flaw arises because the extraction path validation uses prefix comparison without trailing separators, allowing crafted archive entries with names like ../upload_backup/owned.sh to write files outside the intended extraction directory.
CVSS v3.1
Score 7.5high
Affected software
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in rubyzip prior to version 3.4.0 involves improper validation of extraction paths in the Zip::Entry#extract method. The method uses prefix comparison without considering trailing separators, which can be bypassed by attackers crafting archive entries with relative paths such as '../upload_backup/owned.sh'. This allows files to be extracted outside the target directory, potentially overwriting or creating files in sibling directories. This is classified as a CWE-22 (Path Traversal) vulnerability.
Potential Impact
An attacker can create a malicious zip archive that, when extracted using vulnerable rubyzip versions, writes files outside the intended extraction directory. This can lead to arbitrary file creation or overwriting, impacting the integrity of the system. The CVSS score of 7.5 reflects a high severity with network attack vector, low attack complexity, no privileges required, no user interaction, unchanged scope, no confidentiality impact, high integrity impact, and no availability impact.
Mitigation Recommendations
A fix is available in rubyzip version 3.4.0 and later. Users should upgrade to rubyzip 3.4.0 or newer to remediate this vulnerability. Since no vendor advisory or patch links are provided, check the official rubyzip repository or vendor advisory for confirmation and further guidance. Patch status is not yet confirmed in the provided data — verify with the vendor advisory.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-47m2-wp7j-p9vc
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-85396"]
- Database Specific Severity
- HIGH
- Cvss Version
- 3.1
Threat ID: 6a9ad510acd9273b49b67dac
Added to database: 09/04/2026, 14:26:24 UTC
Last enriched: 09/07/2026, 12:52:23 UTC
Last updated: 10/17/2026, 18:48:23 UTC
Views: 29
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.