CVE-2026-85396 rubyzip before 3.4.0 Path Traversal in Zip::Entry#extract via Sibling-Directory Prefix
Attackers can write files outside the intended extraction directory in rubyzip by crafting archive entries with sibling-directory prefixes.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-85396?
CVE-2026-85396 is a high-severity path traversal vulnerability in rubyzip, published on 3 Sep 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official 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.
Weakness: CWE-22
Which versions are affected by CVE-2026-85396?
2 open source packages ship an affected version, including rubyzip.
| Package | Affected | Fixed in |
|---|---|---|
rubyzip RubyGems | All versions | 3.4.0 |
rubyzip RubyGems | All versions | 3.4.0 |
How do I fix CVE-2026-85396?
Upgrade rubyzip to 3.4.0 or later.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2026-85396 being exploited?
There is no known exploitation of CVE-2026-85396 in the wild and no public exploit code.
Sources
Also known as AZL-99087, DEBIAN-CVE-2026-85396, GHSA-47m2-wp7j-p9vc, MINI-6fhm-99fq-cm43, MINI-836c-vm32-rwwj, MINI-c4hj-5g5j-9qr8 and 8 more.