
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-85396 is a path traversal vulnerability in the rubyzip Ruby library affecting all versions before 3.4.0. The flaw exists in the Zip::Entry#extract method, which fails to properly validate extraction paths by using a prefix comparison without a trailing directory separator, allowing crafted archive entries (e.g., ../upload_backup/owned.sh) to write files outside the intended extraction directory into sibling paths that share the destination prefix. It was reported on June 4, 2026, and publicly disclosed on September 3, 2026, with a patch released in rubyzip v3.4.0. The vulnerability carries a CVSS v3.1 base score of 7.5 (High) and a CVSS v4.0 base score of 8.7 (High) (Red Hat CVE, GitHub Advisory).
The root cause is classified as CWE-22 (Improper Limitation of a Pathname to a Restricted Directory — Path Traversal). In lib/zip/entry.rb, the vulnerable check extract_path.start_with?(dest_dir) does not append ::File::SEPARATOR to dest_dir, so a destination directory like /tmp/rzv/upload would incorrectly accept an extraction path of /tmp/rzv/upload_backup/owned.sh because the latter string begins with the former prefix. The check_name method only blocks entry names starting with / or exceeding length limits, and the existing name_safe? helper is never invoked during extraction. The fix in commit 17edfbf changes the guard to extract_path.start_with?(dest_dir + ::File::SEPARATOR) || dest_dir == ::File::SEPARATOR, requiring an exact separator boundary (Patch Commit, Researcher Write-up).
An unauthenticated attacker who can supply a malicious ZIP archive for extraction can write arbitrary files outside the intended extraction directory into sibling paths, with no impact on confidentiality or availability but a high integrity impact. Depending on the application's file permissions and extraction context, this could allow overwriting application source files, configuration files, shell scripts, or cron jobs, potentially escalating to remote code execution if executable files are replaced. The attack is network-deliverable, requires no privileges or user interaction, and is automatable, making it particularly dangerous in web applications that accept user-uploaded archives (Red Hat CVE, GitHub Advisory).
No public proof-of-concept exploit code has been published, and there is no evidence of active in-the-wild exploitation as of the disclosure date. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog. The EPSS score is 0.0, and NVD SSVC assessment classifies exploitation as "none" at this time, though the attack is rated as automatable. The vulnerability was discovered and responsibly disclosed by researcher geo-chen on June 4, 2026, with the report accepted the same day (Red Hat CVE, Researcher Write-up).
../upload_backup/owned.sh. The entry name must share a prefix with the destination directory (e.g., if extraction target is /app/upload, name the entry ../upload_backup/payload.rb).Zip::Entry#extract or Zip::File#extract with a controlled destination directory.entry.extract(destination_directory: '/app/upload'). The vulnerable prefix check extract_path.start_with?('/app/upload') passes for /app/upload_backup/payload.rb, and the file is written to the sibling directory./app/upload_backup/ when extraction target is /app/upload/); newly created or modified shell scripts, Ruby files, or configuration files in application directories not normally written to during extraction.WARNING: skipped extracting messages (if patched) or absence of such warnings alongside unexpected file creation events; web server access logs showing ZIP file uploads followed by unusual application behavior.Upgrade rubyzip to version 3.4.0 or later, which contains the fix in commit 17edfbf that appends ::File::SEPARATOR to the destination directory in the path prefix check (rubyzip v3.4.0 Release). As a defense-in-depth measure, validate and sanitize all archive entry names before extraction, invoke name_safe? on entries prior to calling extract, and restrict file system write permissions so the application process cannot write to directories outside the intended extraction target. Consider implementing an allowlist of permitted extraction directories and monitoring for unexpected file creation events in sensitive paths (GitHub Advisory).
The vulnerability was assigned by VulnCheck and tracked by Red Hat, ENISA (EUVD-2026-70673), and the GitHub Advisory Database (GHSA-47m2-wp7j-p9vc). The rubyzip maintainer accepted the responsible disclosure report on the same day it was submitted (June 4, 2026). Community reaction has been limited, with automated CVE tracking services (cvefeed.io, vuldb.com, cve.report) picking up the disclosure shortly after publication (Red Hat CVE, GitHub Advisory).
Fix availability across major Linux distributions and their releases.
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."