RubySec

Providing security resources for the Ruby community

CVE-2026-85396 (rubyzip): path traversal vulnerability in pre-3.4.0 rubyzip gem

path traversal vulnerability in pre-3.4.0 rubyzip gem

Published: September 03, 2026

SECURITY IDENTIFIERS

GEM

rubyzip

SEVERITY

CVSS v3.x: 7.5 (High)

PATCHED VERSIONS

>= 3.4.0

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.

RELATED