# CVE-2026-85396: rubyzip before 3.4.0 Path Traversal in Zip::Entry#extract via Sibling-Directory Prefix

- Severity: High 8.7 (CVSS:4.0, scored by VulnCheck) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.38%, higher than 34% of CVEs (2026-12-02)
- Published: 2026-09-03T18:54:27.903Z
- Modified: 2026-09-25T19:45:09.880Z
- Also known as: GHSA-47m2-wp7j-p9vc
- Weaknesses: CWE-22
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: VulnCheck

## 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.

(As written by CVE List.)

## Affected

- rubyzip rubyzip: before 3.4.0 (not affected: 3.4.0)
- rubyzip (RubyGems): before 3.4.0

## Every score

- VulnCheck: CVSS: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: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`
- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`
- GitHub: CVSS:4.0 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`

## References

- <https://github.com/rubyzip/rubyzip/commit/17edfbf4423b83211b075acc23a7d8640da63449> (patch, web)
- <https://github.com/rubyzip/rubyzip> (package, product)
- <https://github.com/rubyzip/rubyzip/releases/tag/v3.4.0> (release-notes, web)
- <https://github.com/rubyzip/rubyzip/blob/v3.3.1/lib/zip/entry.rb> (technical-description, web)
- <https://github.com/geo-chen/oss/blob/main/rubyzip.md> (technical-description, web)
- <https://www.vulncheck.com/advisories/rubyzip-before-3.4.0-path-traversal-in-zip-entry-extract-via-sibling-directory-prefix> (third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-85396> (advisory)
- <https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rubyzip/CVE-2026-85396.yml> (web)

## Sources

- CVE List: [CVE-2026-85396](https://www.cve.org/CVERecord?id=CVE-2026-85396), CVE Terms of Use, modified 2026-09-03
- GitHub Advisory Database: [GHSA-47m2-wp7j-p9vc](https://github.com/advisories/GHSA-47m2-wp7j-p9vc), CC-BY-4.0, modified 2026-09-25
- NVD: [CVE-2026-85396](https://nvd.nist.gov/vuln/detail/CVE-2026-85396), Public domain, modified 2026-09-24

---

Page: https://cve.day/CVE-2026-85396 · Whole record: https://cve.day/CVE-2026-85396.json · Rebuilt by cve.day 2026-11-25T22:59:36.222Z
