CVE-2019-8320

HIGH

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.

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

Details

Source: MITRE

Published: 2019-06-06

Updated: 2020-08-16

Type: CWE-22

Risk Information

CVSS v2.0

Base Score: 8.8

Vector: AV:N/AC:M/Au:N/C:N/I:C/A:C

Impact Score: 9.2

Exploitability Score: 8.6

Severity: HIGH

CVSS v3.0

Base Score: 7.4

Vector: CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:H

Impact Score: 5.2

Exploitability Score: 2.2

Severity: HIGH

Vulnerable Software

Configuration 1

OR

cpe:2.3:a:rubygems:rubygems:*:*:*:*:*:*:*:* versions from 2.7.6 to 3.0.2 (inclusive)

Tenable Plugins

View all (10 total)

IDNameProductFamilySeverity
139628Debian DLA-2330-1 : jruby security updateNessusDebian Local Security Checks
high
137599SUSE SLES12 Security Update : ruby2.1 (SUSE-SU-2020:1570-1)NessusSuSE Local Security Checks
high
127811Amazon Linux AMI : ruby20 / ruby21,ruby24 (ALAS-2019-1255)NessusAmazon Linux Local Security Checks
high
126904openSUSE Security Update : ruby-bundled-gems-rpmhelper / ruby2.5 (openSUSE-2019-1771)NessusSuSE Local Security Checks
high
126617SUSE SLED15 / SLES15 Security Update : ruby-bundled-gems-rpmhelper, ruby2.5 (SUSE-SU-2019:1804-1)NessusSuSE Local Security Checks
high
124728Fedora 28 : ruby (2019-feac6674b7)NessusFedora Local Security Checks
high
124574Fedora 29 : ruby (2019-a155364f3c)NessusFedora Local Security Checks
high
124096Debian DSA-4433-1 : ruby2.3 - security updateNessusDebian Local Security Checks
high
123522Debian DLA-1735-1 : ruby2.1 security updateNessusDebian Local Security Checks
high
122883FreeBSD : RubyGems -- multiple vulnerabilities (27b12d04-4722-11e9-8b7c-b5e01141761f)NessusFreeBSD Local Security Checks
high