{"id":"GHSA-47m2-wp7j-p9vc","summary":"rubyzip path traversal vulnerability","details":"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.","aliases":["CVE-2026-85396"],"modified":"2026-09-25T19:45:10.467057513Z","published":"2026-09-03T21:31:16Z","database_specific":{"nvd_published_at":"2026-09-03T19:17:31Z","cwe_ids":["CWE-22"],"severity":"HIGH","github_reviewed":true,"github_reviewed_at":"2026-09-25T19:25:52Z"},"references":[{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-85396"},{"type":"WEB","url":"https://github.com/rubyzip/rubyzip/commit/17edfbf4423b83211b075acc23a7d8640da63449"},{"type":"WEB","url":"https://github.com/geo-chen/oss/blob/main/rubyzip.md"},{"type":"WEB","url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rubyzip/CVE-2026-85396.yml"},{"type":"PACKAGE","url":"https://github.com/rubyzip/rubyzip"},{"type":"WEB","url":"https://github.com/rubyzip/rubyzip/blob/v3.3.1/lib/zip/entry.rb"},{"type":"WEB","url":"https://github.com/rubyzip/rubyzip/releases/tag/v3.4.0"},{"type":"WEB","url":"https://www.vulncheck.com/advisories/rubyzip-before-3.4.0-path-traversal-in-zip-entry-extract-via-sibling-directory-prefix"}],"affected":[{"package":{"name":"rubyzip","ecosystem":"RubyGems","purl":"pkg:gem/rubyzip"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.4.0"}]}],"versions":["0.5.11","0.5.12","0.5.7","0.5.8","0.5.9","0.9.1","0.9.4","0.9.5","0.9.6.1","0.9.7","0.9.8","0.9.9","1.0.0","1.0.0.beta1","1.1.0","1.1.1","1.1.2","1.1.3","1.1.4","1.1.5","1.1.6","1.1.7","1.2.0","1.2.1","1.2.2","1.2.3","1.2.4","1.3.0","2.0.0","2.1.0","2.2.0","2.3.0","2.3.1","2.3.2","2.4.1","2.4.rc1","3.0.0","3.0.0.alpha","3.0.0.rc1","3.0.0.rc2","3.0.1","3.0.2","3.1.0","3.1.1","3.2.0","3.2.1","3.2.2","3.3.0","3.3.1"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-47m2-wp7j-p9vc/GHSA-47m2-wp7j-p9vc.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"},{"type":"CVSS_V4","score":"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"}]}