CVE-2017-5946 json
Directory traversal vulnerability in RubyZip
published 2017-02-27 9 y ago modified 2026-06-17 4 mo ago also GHSA-gcqq-w6gr-h9j9 , EUVD-2017-0236
- cvss
- 9.8
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 3.4%
- EPSS 3.4% chance of exploitation in 30 days, percentile 89%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- rubygems rubyzip 1.2.1
- rubyzip_project rubyzip 1.2.1
- ruby-zip Debian 14, Debian 13, Debian 12 1.2.0-1.1
debian advisories DEBIAN-CVE-2017-5946
- rubygem-rubyzip openSUSE Tumbleweed 2.3.2-1.19
- rubygem-rubyzip openSUSE Tumbleweed 2.3.2-1.17
- rubygem-rubyzip openSUSE Tumbleweed 2.3.2-1.15
- ruby3.2-rubygem-rubyzip openSUSE Tumbleweed 2.3.2-1.11
opensuse advisories openSUSE-SU-2026:10363-1openSUSE-SU-2025:15126-1openSUSE-SU-2024:14176-1openSUSE-SU-2024:13168-1
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2017-5946 updated cvss 7.0
rubygem-rubyzip: Directory traversal in the Zip::File component
-
Red Hat Quickstart Cloud Installer 1 tfm-rubygem-rubyzipunder investigation
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
3.44% chance of exploitation in the next 30 days, higher than 89% of all scored CVEs (FIRST EPSS, 2026-11-09).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 2.0 | 7.5 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
| GitHub | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| rubygems | rubyzip | <1.2.1 |
1.2.1 |
Classification
- Weakness
-
- CWE-22 Improper Limitation of a Pathname to a Restricted Directory
References
-
github.com
/rubyzip/rubyzip/commit/ce4208fdecc2ad079b05d3c49d70fe6ed1d07016
web
-
debian.org
/security/2017/dsa-3801
vendor-advisory, web, third-party-advisory
-
github.com
/rubyzip/rubyzip/releases
web, third-party-advisory
-
securityfocus.com
/bid/96445
vdb-entry, third-party-advisory
-
github.com
/rubyzip/rubyzip/issues/315
web, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2017-5946
advisory
-
github.com
/rubysec/ruby-advisory-db/blob/master/gems/rubyzip/CVE-2017-5946.yml
web
-
github.com
/rubyzip/rubyzip
package
-
web.archive.org
/web/20200227185727/http://www.securityfocus.com/bid/96445
web
Sources
- CVE List CVE-2017-5946
- GitHub Advisory GHSA-gcqq-w6gr-h9j9
- NVD CVE-2017-5946
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.