Advisory Database
  • Advisories
  • Dependency Scanning
  1. gem
  2. ›
  3. rubygems-update
  4. ›
  5. CVE-2019-8320

CVE-2019-8320: Path Traversal

June 6, 2019 (updated June 11, 2019)

A Directory Traversal issue was discovered in RubyGems. Before making new directories or touching files (which now include path-checking code for symlinks), it would delete the target destination. If that destination was hidden behind a symlink, a malicious gem could delete arbitrary files on the user’s machine, presuming the attacker could guess at paths. Given how frequently gem is run as sudo, and how predictable paths are on modern systems (/tmp, /usr, etc.), this could likely lead to data loss or an unusable system.

References

  • blog.rubygems.org/2019/03/05/security-advisories-2019-03.html
  • nvd.nist.gov/vuln/detail/CVE-2019-8320

Code Behaviors & Features

Detect and mitigate CVE-2019-8320 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 2.7.6 up to 3.0.2

Fixed versions

  • 3.0.3

Solution

Upgrade to version 3.0.3 or above.

Impact 7.4 HIGH

CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/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/rubygems-update/CVE-2019-8320.yml

Spotted a mistake? Edit the file on GitLab.

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

Page generated Wed, 14 May 2025 12:15:38 +0000.