Intel

AIKIDO-2026-108299

rubyzip is vulnerable to Path Traversal

CVE-2026-85396Published Jun 16, 2026
June 16, 2026

61

CVE Score

Medium

Path Traversal

Are you affected? Scan for Free

TL;DR

The rubyzip library checks extracted paths against a destination directory using a prefix match that does not enforce a directory boundary. A crafted ZIP archive can pass this check when the resolved output path shares a prefix with the destination directory, allowing files to be written outside the intended extraction folder. The same release also validates declared central-directory entry counts against header size and stops iterating on the first invalid entry to reduce denial-of-service impact from malformed archive metadata. The fix adds a directory-separator boundary to the containment check and hardens central-directory parsing.

How do I fix this?

Upgrade the rubyzip library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and your application extracts entries from untrusted ZIP archives using the destination_directory option.

Package

Versions

3.0.0 - 3.3.1

Fixed in 3.4.0

Background info

rubyzip is vulnerable to Path Traversal in versions 3.0.0 - 3.3.1.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea