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

Published Sep 3, 2026
·
Updated

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 ../uploadbackup/owned.sh to write files outside the intended extraction directory into sibling paths sharing the destination prefix.

Affected Software

1 affected component
rubyzip<3.4.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade rubyzip to a version that resolves this vulnerability.

    Fixed in 3.4.0

Event History

Sep 3, 2026
CVE Published
via MITRE·06:54 PM
Data Sourced
via MITRE·06:54 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which deployments are exposed?

Deployments using rubyzip versions before 3.4.0 are exposed when they use Zip::Entry#extract to extract archive entries. The risk is relevant where a crafted archive can be supplied for extraction.

2

What does an attacker need to exploit this issue?

An attacker needs to provide a crafted archive containing an entry name such as ../upload_backup/owned.sh. The vulnerable prefix comparison can then allow writing to a sibling path outside the intended extraction directory.

3

How can I determine whether my application is affected?

Check whether the application uses a rubyzip release before 3.4.0 and calls Zip::Entry#extract. Also review whether its archive extraction workflow can process attacker-controlled or otherwise untrusted archives.

4

What is the available fix?

Upgrade rubyzip to version 3.4.0 or later. Version 3.4.0 is identified as the release containing the fix.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203