Security mailing lists by PureSourceCode

CVE-2019-8320

HIGH 7.4CVSS 3.0

RubyGems Delete directory using symlink when decompressing tar

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.

Published
6 Jun 2019
Last modified
17 Jun 2026
Assigned by
cve@mitre.org
NVD status
Modified
Weakness
CWE-22
Also known as
GHSA-5x32-c9mf-49cc
Sources
NVDJSONOSV GHSA-5x32-c9mf-49ccJSON

Scores

SourceScored byVersionScoreVector / decision
NVD nvd@nist.gov (Primary) CVSS 3.0 HIGH 7.4 CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:H
OSV GitHub CVSS 3.0 HIGH 7.4 CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:H
NVD nvd@nist.gov (Primary) CVSS 2.0 HIGH 8.8 AV:N/AC:M/Au:N/C:N/I:C/A:C

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
NVD rubygems rubygems
cpe:2.3:a:rubygems:rubygems:*:*:*:*:*:*:*:*
>= 2.7.6, <= 3.0.2
OSV RubyGems rubygems-update >= 2.7.6, < 2.7.9 2.7.9
OSV RubyGems rubygems-update >= 3.0.0, < 3.0.3 3.0.3

References

History

  • 25 Nov 2026 20:22 UTC · NVD: first stored (published 6 Jun 2019)
  • 25 Nov 2026 20:14 UTC · OSV: first stored (published 20 Jun 2019)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.