Skip to content
OpenAdvisories
Critical · 9.8 CVE-2017-5946 EUVD-2017-0236GHSA-gcqq-w6gr-h9j9

Directory traversal vulnerability in RubyZip

Published Feb 27, 2017 · Updated Aug 5, 2024 · Assigned by mitre

Description

The Zip::File component in the rubyzip gem before 1.2.1 for Ruby has a directory traversal vulnerability. If a site allows uploading of .zip files, an attacker can upload a malicious file that uses "../" pathname substrings to write arbitrary files to the filesystem.

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 ruby-zip 1.2.0-1.1 —
Debian 13 ruby-zip 1.2.0-1.1 —
Debian 12 ruby-zip 1.2.0-1.1 —
Debian 8 ruby-zip 1.1.6-1+deb8u1 DSA-3801-1
Debian 7 libzip-ruby 0.9.4-1+deb7u1 DLA-846-1
ReleasePackageFixed inAdvisory
Ubuntu 16.04 LTS ruby-zip No fix yet —
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed ruby3.2-rubygem-rubyzip 2.3.2-1.11 openSUSE-SU-2024:13168-1
openSUSE Tumbleweed rubygem-rubyzip 2.3.2-1.15 openSUSE-SU-2026:10363-1, openSUSE-SU-2025:15126-1, openSUSE-SU-2024:14176-1

Affected packages

EcosystemPackageAffectedFixedRecord
RubyGems rubyzip < 1.2.1 1.2.1 GHSA-gcqq-w6gr-h9j9

Advisories 6

References