CVE-2026-85396
rubyzip before 3.4.0 Path Traversal in Zip::Entry#extract via Sibling-Directory Prefix
- State
- Published
- Severity
- 8.7 High
- Published
- Sep 3, 2026
- Updated
- Sep 3, 2026
- Reserved
- Sep 3, 2026
Description
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.
Scores
| CVSS | Score | Vector | Source |
|---|---|---|---|
| 4.0 | 8.7 High | 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 | VulnCheck |
| 3.1 | 7.5 High | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N | VulnCheck |
Weaknesses
- CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Products
| Product | Versions |
|---|---|
rubyziprubyzip |
|
References
- Patch Commitpatch
- https://github.com/rubyzip/rubyzipproduct
- rubyzip v3.4.0 Release Notesrelease-notes
- https://github.com/rubyzip/rubyzip/blob/v3.3.1/lib/zip/entry.rbtechnical-description
- https://github.com/geo-chen/oss/blob/main/rubyzip.mdtechnical-description
- VulnCheck Advisory: rubyzip before 3.4.0 Path Traversal in Zip::Entry#extract via Sibling-Directory Prefixthird-party-advisory
Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.