CVE-2019-8320Rubygems
High 7.4 No auth needed
Follow: this CVE · Rubygems · Rubygems We alert you by email or Slack (account required).
- Priority
- 60
- CVSS 3.0
- 7.4
- EPSS
- 4.2% probability of exploitation in 30 days · percentile 92
- Auth required
- No
- Published
- Jun 6, 2019
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-22
- Vector
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:H
What happens
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.
What to do
- Apply the vendor's security update for Rubygems.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| RubyGems | rubygems-update |
≥ 2.7.6 < 2.7.9 |
2.7.9 |
gem "rubygems-update", ">= 2.7.9" |
| RubyGems | rubygems-update |
≥ 3.0.0 < 3.0.3 |
3.0.3 |
gem "rubygems-update", ">= 3.0.3" |
Per OSV / GitHub Advisories (GHSA-5x32-c9mf-49cc). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| rubygems | rubygems | ≥ 2.7.6 ≤ 3.0.2 |
Official sources
References
Links published by the sources. Open them with care.
- lists.opensuse.org
- access.redhat.com
- blog.rubygems.org Vendor Advisory
- hackerone.com Exploit Third Party Advisory
- lists.debian.org