Skip to main content
No exploitation reportedFix available

CVE-2019-8320

No exploitation reported by the sources we read.

  • Published2019-06-06
  • WeaknessCWE-22

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

Description

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.

Timeline

dates in UTC
  1. 2019-06-0615:29CVE publishedNVD

Versions per branch

NVD · OSV
Rubygems
BranchAffectedFixed in
3.0≥ 2.7.6, ≤ 3.0.2no fix published
rubygems-update
BranchAffectedFixed in
3.0≥ 3.0.0, < 3.0.33.0.3
2.7≥ 2.7.6, < 2.7.92.7.9

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • cfmeRed Hat:cloudforms_managementengine:5.10::el7all versions · fixed in 0:5.10.5.1-1.el7cfand 8 other packages
  • jrubyMageia:7all versions · fixed in 1.7.22-7.2.mga7
  • jrubyDebian:14all versions · fixed in 9.1.17.0-3
  • jrubyDebian:13all versions · fixed in 9.1.17.0-3
  • jrubyDebian:12all versions · fixed in 9.1.17.0-3
  • jrubyDebian:9all versions · fixed in 1.7.26-1+deb9u2
  • rh-ruby24-rubyRed Hat:rhel_software_collections:3::el7all versions · fixed in 0:2.4.6-92.el7and 5 other packages
  • rh-ruby24-rubyRed Hat:rhel_software_collections:3::el6all versions · fixed in 0:2.4.6-92.el6and 5 other packages

130 more package ranges on OSV.dev

Vendor advisories

  • CVE-2019-8320 Red Hat Product Security523 products fixed · 20 known affected

    rubygems: Delete directory using symlink when decompressing tar

    rh-ruby23-ruby as a component of Red Hat Software Collections · rh-ruby23-ruby-devel as a component of Red Hat Software Collections · rh-ruby23-ruby-doc as a component of Red Hat Software Collections · +17 more

  • RHBA-2019:3384 Red Hat Product Security144 products fixed

    Red Hat Bug Fix Advisory: ruby:2.5 bug fix and enhancement update

  • RHSA-2019:1429 Red Hat Product Security34 products fixed

    Red Hat Security Advisory: CloudForms 4.7.5 security, bug fix and enhancement update

  • RHSA-2019:1150 Red Hat Product Security154 products fixed

    Red Hat Security Advisory: rh-ruby24-ruby security, bug fix, and enhancement update

  • RHSA-2019:1148 Red Hat Product Security191 products fixed

    Red Hat Security Advisory: rh-ruby25-ruby security, bug fix, and enhancement update

Full record on NVD

Fix

  1. Vendor fix Red Hat Product Security RHBA-2019:3384 · 144 productsBefore applying this update, make sure all previously released errata relevant to your system have been applied. For details on how to apply this update, refer to: https://access.redhat.com/articles/11258
  2. Vendor fix Red Hat Product Security RHSA-2019:1429 · 34 productsFor details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258 If the postgresql service is running, it will be automatically restarted after installing this update. After installing the updated packages, the http…
  3. Vendor fix Red Hat Product Security RHSA-2019:1150 · 154 productsFor details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258
  4. No fix planned, says the vendor Red Hat Product Security CVE-2019-8320 · 20 productsWill not fix

Advisories and patches

Detection

Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
Metasploit modules
none listed
Metasploit Framework

Sources

Identifiers

Technical details

CVSS v3 vector
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:H
Published
2019-06-06
Last modified
2026-06-17
NVD status
Modified
GitHub advisory
GHSA-5x32-c9mf-49cc

Frequently asked questions

What is CVE-2019-8320?

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.

Is CVE-2019-8320 actively exploited?

Active exploitation of CVE-2019-8320 has not been confirmed. Its EPSS score was 4.2% on 2026-12-03, the estimated probability of exploitation in the next 30 days.

What is the CVSS score for CVE-2019-8320?

CVE-2019-8320 has a CVSS v3 base score of 7.4 (High severity), with vector string CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:H.

Running rubygems? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website checks · 250 API requests/month

Sources for this record