Advisory Database
  • Advisories
  • Dependency Scanning
  1. gem
  2. ›
  3. rubyzip
  4. ›
  5. CVE-2017-5946

CVE-2017-5946: Directory traversal vulnerability

February 27, 2017 (updated November 4, 2017)

The Zip::File component in the rubyzip gem 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.

References

  • github.com/rubyzip/rubyzip/issues/315
  • nvd.nist.gov/vuln/detail/CVE-2017-5946

Code Behaviors & Features

Detect and mitigate CVE-2017-5946 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions up to 1.2.0

Fixed versions

  • 1.2.1

Solution

Upgrade to version 1.2.1 or above.

Impact 9.8 CRITICAL

CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Source file

gem/rubyzip/CVE-2017-5946.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:15:56 +0000.