Loading...
Skip to main content

CVE-2019-8320

HIGH

RubyGems Delete directory using symlink when decompressing tar

Published June 20, 2019Updated February 16, 2024Source: osv

Summary

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.

Remediation

Upgrade to the fixed version using your package manager.

Bundler
Update rubygems-update to 3.0.3 or later
gem install rubygems-update -v 3.0.3
Bundler
Update rubygems-update to 2.7.9 or later
gem install rubygems-update -v 2.7.9

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (2)

PackageEcosystemAffectedFixed In
rubygems-update
rubygems
3.0.0, 3.0.1, 3.0.23.0.3
rubygems-update
rubygems
2.7.6, 2.7.7, 2.7.82.7.9

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 7.4 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
High

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

Frequently Asked Questions

What is CVE-2019-8320?
RubyGems Delete directory using symlink when decompressing tar This vulnerability has been assigned a severity rating of HIGH (CVSS score: 7.4/10).
How do I check if my project is affected by CVE-2019-8320?
CVE-2019-8320 affects rubygems-update. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2019-8320 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
7.4

High exploitability or significant impact. Prioritize remediation within days.

Also Known As

GHSA-5x32-c9mf-49cc

Related CVEs

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies