Live threats

All CVEs / Rubygems

CVE-2019-8320Rubygems

High 7.4 No auth needed

Priority
60
CVSS 3.0
7.4
EPSS
4.2%
probability of exploitation in 30 days · percentile 92
Auth required
No
Published
Jun 6, 2019
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-22
Vector
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:H

What happens

A Directory Traversal issue was discovered in RubyGems 2.7.6 and later through 3.0.2. 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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Rubygems.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
RubyGems rubygems-update ≥ 2.7.6 < 2.7.9 2.7.9 gem "rubygems-update", ">= 2.7.9"
RubyGems rubygems-update ≥ 3.0.0 < 3.0.3 3.0.3 gem "rubygems-update", ">= 3.0.3"

Per OSV / GitHub Advisories (GHSA-5x32-c9mf-49cc). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
rubygemsrubygems≥ 2.7.6 ≤ 3.0.2

Official sources

References

Links published by the sources. Open them with care.