High severity · published Jun 6, 2019
CVE-2019-8320
A Directory Traversal issue was discovered in RubyGems 2.7.6 and later through 3.0.2
7.4
CVSS
4.2%
EPSS
No
On KEV
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 vector
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:H
Attack vector
Network
Complexity
High
Privileges
None
User interaction
None
Confidentiality
None
Integrity
High
Availability
High
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)4.2% · higher than 91% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
RU
Rubygems · Rubygems
2.7.6 through 3.0.2 · source: NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2019-8320
CVE.org
https://www.cve.org/CVERecord?id=CVE-2019-8320
lists.opensuse.org
http://lists.opensuse.org/opensuse-security-announce/2019-07/msg00036.html
access.redhat.com
https://access.redhat.com/errata/RHSA-2019:1429
Vendor Advisory
https://blog.rubygems.org/2019/03/05/security-advisories-2019-03.html
Exploit
https://hackerone.com/reports/317321
lists.debian.org
https://lists.debian.org/debian-lts-announce/2020/08/msg00027.html
More from Rubygems
9.8
CVE-2018-1000076
RubyGems version Ruby 2.2 series: 2.2.9 and earlier, Ruby 2.3 series: 2.3.6 and earlier, Ruby 2.4 series: 2.4.3 and earlier, Ruby 2.5 series: 2.5.0 and earlier, prior to trunk…
9.8
CVE-2017-0903
RubyGems versions between 2.0.0 and 2.6.13 are vulnerable to a possible remote code execution vulnerability
9.8
CVE-2017-0899
RubyGems version 2.6.12 and earlier is vulnerable to maliciously crafted gem specifications that include terminal escape characters
8.8
CVE-2022-36073
RubyGems.org is the Ruby community gem host
8.8
CVE-2019-8324
An issue was discovered in RubyGems 2.6 and later through 3.0.2
