{"cve":"CVE-2019-8320","nvd":{"published":"2019-06-06T15:29:01.420","modified":"2026-06-17T02:41:50.463","status":"Modified","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.","cvss_v4":null,"cvss_v3":{"version":"3.0","vector":"CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:H","score":7.4},"cwes":["CWE-22"],"references":["http://lists.opensuse.org/opensuse-security-announce/2019-07/msg00036.html","https://access.redhat.com/errata/RHSA-2019:1429","https://blog.rubygems.org/2019/03/05/security-advisories-2019-03.html","https://hackerone.com/reports/317321","https://lists.debian.org/debian-lts-announce/2020/08/msg00027.html"],"products":["rubygems:rubygems"],"source":"nvd","synced_at":"2026-10-19T20:57:00.690689396+00:00"},"epss":{"cve":"CVE-2019-8320","score":0.04193,"percentile":0.90942,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-5x32-c9mf-49cc","url":"https://osv.dev/vulnerability/GHSA-5x32-c9mf-49cc","summary":"RubyGems Delete directory using symlink when decompressing tar","modified":"2024-02-16T08:13:45.798960Z","packages":[{"ecosystem":"RubyGems","name":"rubygems-update","purl":"pkg:gem/rubygems-update","ranges":[">=2.7.6 <2.7.9"],"fixed":["2.7.9"]},{"ecosystem":"RubyGems","name":"rubygems-update","purl":"pkg:gem/rubygems-update","ranges":[">=3.0.0 <3.0.3"],"fixed":["3.0.3"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}