CVE-2019-8320
HIGH 7.4CVSS 3.0RubyGems 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
| Source | Scored by | Version | Score | Vector / 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
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | rubygems | rubygemscpe: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
- http://lists.opensuse.org/opensuse-security-announce/2019-07/msg00036.html · WEB
- https://access.redhat.com/errata/RHSA-2019:1429 · WEB
- https://blog.rubygems.org/2019/03/05/security-advisories-2019-03.html · Vendor Advisory, WEB
- https://hackerone.com/reports/317321 · Exploit, Third Party Advisory, WEB
- https://lists.debian.org/debian-lts-announce/2020/08/msg00027.html · WEB
- https://nvd.nist.gov/vuln/detail/CVE-2019-8320 · ADVISORY
- https://github.com/rubygems/rubygems · PACKAGE
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rubygems-update/CVE-2019-8320.yml · WEB
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)