VDB

CVE-2019-8320

CVE-2019-8320 PUBLISHED CVSS 7.400000095367432 HIGH

RubyGems Delete directory using symlink when decompressing tar

Reported by mitre · Published June 6, 2019

rubygems-update is fixed in 3.0.3 and 2.7.9 (RubyGems)

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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
rubygems-updateRubyGems3.0.3, 2.7.9
rubyAlpine2.5.5-r0, 2.4.6-r0
rubygemsrubygems3.0.2

Risk scores

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

Affected products

VendorProductVersions
n/an/an/a
alpineruby0, 0
RubyGemsrubygems-update2.7.6
n/an/a*

Timeline

  • Apr 11, 2019 PoC Published
  • Jun 6, 2019 CVE Published
  • Apr 14, 2021 EPSS Score (30 in total, the first dated here)
  • Mar 6, 2026 Distribution Patch (2 in total, the first dated here)
  • Mar 6, 2026 Security Advisory (5 in total, the first dated here)
  • Sep 7, 2026 Coalition ESS Score

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2019-8320
vulnetix vdb fixes CVE-2019-8320

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2019-8320/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

References

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›