CVE-2017-5946 · mitre
CVE-2017-5946
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.
Published 2017-02-27, last changed 2026-06-17. Weakness: CWE-22.
How to fix
Upgrade to a fixed version: rubyzip 1.2.1 (RubyGems). For the version that clears every advisory for your installed version, ask an agent for get_remediation.
Where the flaw is in the code
Fixed in rubyzip/rubyzip by ce4208fdec, 98f4f2ed9b. Functions changed by the fix: extract. Confidence: inferred (code changed near the fix, but no record names this exact commit as the fix).
Timeline
| 2017-02-27 | Published |
| 2017-10-24 | Package advisory GHSA-gcqq-w6gr-h9j9 |
| 2026-06-17 | Record last changed |
| 2026-11-30 | EPSS when our history starts: 3.44% |
| 2026-12-02 | Code-level analysis added |
Affected packages
| Advisory | Package | Fixed in |
|---|---|---|
| GHSA-gcqq-w6gr-h9j9 | rubyzip (RubyGems) | 1.2.1 |
Also known as: GHSA-gcqq-w6gr-h9j9
Related
| CVE | Published | CVSS | Summary |
|---|---|---|---|
| CVE-2026-85396 | 2026-09-03 | 7.5 | rubyzip before 3.4.0 Path Traversal in Zip::Entry#extract via Sibling-Directory Prefix |
| CVE-2019-16892 | 2019-09-25 | 5.5 | same package: rubyzip (RubyGems) |
| CVE-2018-1000544 | 2018-06-26 | 9.8 | same package: rubyzip (RubyGems) |
| CVE-2026-138340 | 2026-11-29 | 6.5 | same weakness (CWE-22) from the same CNA (mitre) |
| CVE-2026-117373 | 2026-11-11 | 6.5 | same weakness (CWE-22) from the same CNA (mitre) |
| CVE-2026-38600 | 2026-11-03 | 9.8 | same weakness (CWE-22) from the same CNA (mitre) |
| CVE-2026-38595 | 2026-11-03 | 9.8 | same weakness (CWE-22) from the same CNA (mitre) |
| CVE-2026-117127 | 2026-11-02 | 7.5 | same weakness (CWE-22) from the same CNA (mitre) |
Add it to your agent
One command for Claude Code; setup for Claude Desktop, Cursor and others. No signup or key.
claude mcp add --transport http keygraph-cve https://cve-mcp.keygraph.io/mcp
Then ask for triage_cve CVE-2017-5946, or call /api/v1/vulnerabilities/CVE-2017-5946. To prove whether it is exploitable in your running app, run Shannon, Keygraph's open-source AI pentester.