rubyzip path traversal vulnerability
Published 3 Sept 2026 · Updated 25 Sept 2026
Is your project on an affected rubyzip?
Look after several Rails or Ruby apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected package
- Affected
- <3.4.0
- Fixed in
- 3.4.0
bundle update --conservative rubyzip # Gemfile: '>= 3.4.0'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.
Is GHSA-47m2-wp7j-p9vc in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected rubyzip, and gives you the command that fixes it.
More advisories for rubyzip
- MediumCVE-2019-16892Rubyzip denial of service · 30 Sept 2019
- CriticalCVE-2018-1000544Rubyzip gem contains a Directory Traversal vulnerability in zip file component · 6 Sept 2018
- CriticalCVE-2017-5946Directory traversal vulnerability in RubyZip · 24 Oct 2017
References
- Advisorynvd.nist.gov/vuln/detail/CVE-2026-85396
- Linkgithub.com/rubyzip/rubyzip/commit/17edfbf4423b83211b075acc23a7d8640da63449
- Linkgithub.com/geo-chen/oss/blob/main/rubyzip.md
- Linkgithub.com/rubysec/ruby-advisory-db/blob/master/gems/rubyzip/CVE-2026-85396.yml
- Packagegithub.com/rubyzip/rubyzip
- Linkgithub.com/rubyzip/rubyzip/blob/v3.3.1/lib/zip/entry.rb
- Linkgithub.com/rubyzip/rubyzip/releases/tag/v3.4.0
- Linkwww.vulncheck.com/advisories/rubyzip-before-3.4.0-path-traversal-in-zip-entry-extract-via-sibling-directory-prefix
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.