cve.bz

CVE-2017-5946 Path traversal

9.8 criticalEPSS 3.4%Fix available

Critical (9.8). EPSS 3.4% estimated probability of exploitation activity in the next 30 days. Fixed in rubyzip 1.2.1.

On this page
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.

Severity

CVSS 3.1

9.8 critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
3.4% (unchanged from 3.4% a week ago; 3.4% 30 days ago) estimated probability of exploitation activity in the next 30 days; 89th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-22 Improper Limitation of a Pathname to a Restricted Directory (Path traversal)
OWASP Top 10
A01:2025 Broken Access Control
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2017-5946 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2017-5946?via=ask-ai-copy and https://cve.bz/cve/CVE-2017-5946?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2017-5946 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
rubyzip_project:rubyzipbefore 1.2.1
debian:debian_linux8.0
debian:debian_linux9.0

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-gcqq-w6gr-h9j9RubyGemsrubyzip<1.2.11.2.1

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian7libzip-ruby0.9.4-1+deb7u1DLA-846-1
Debian8ruby-zip1.1.6-1+deb8u1DSA-3801-1
Debian12, 13, 14ruby-zip1.2.0-1.1DEBIAN-CVE-2017-5946
Ubuntu16.04:LTSruby-zipno fix listedUBUNTU-CVE-2017-5946
openSUSETumbleweedruby3.2-rubygem-rubyzip2.3.2-1.11openSUSE-SU-2024:13168-1
openSUSETumbleweedrubygem-rubyzip2.3.2-1.15openSUSE-SU-2024:14176-1
openSUSETumbleweedrubygem-rubyzip2.3.2-1.17openSUSE-SU-2025:15126-1
openSUSETumbleweedrubygem-rubyzip2.3.2-1.19openSUSE-SU-2026:10363-1

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · openSUSE.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

This issue affects the versions of rubygem-rubyzip as shipped with Red Hat Quick Cloud Installer. Red Hat Product Security has rated this issue as having Moderate security impact. A future update may address this issue. For additional information, refer to the Issue Severity Classification: https://access.redhat.com/security/updates/classification/.

ProductPackageStateAdvisory
Red Hat Quickstart Cloud Installer 1tfm-rubygem-rubyzipUnder investigation

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2017-5946.

Attack patterns (CAPEC)

  • CAPEC-64 Using Slashes and URL Encoding Combined to Bypass Validation Logic Likelihood: High · Severity: High
  • CAPEC-76 Manipulating Web Input to File System Calls Likelihood: High · Severity: Very High
  • CAPEC-78 Using Escaped Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-79 Using Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-126 Path Traversal Likelihood: High · Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON