CVE-2017-0899 — Vulnerability in rubygems-update — CVE Details
RubyGems Code Injection vulnerability
What Should I Do?
Low-to-Moderate Risk
Exploitation probability is 11.10% in 30 days. Address in your next planned sprint.
Does your project use an affected rubygems-update version?
Paste your Gemfile.lock to check it for CVE-2017-0899 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
RubyGems prior to 2.6.13 is vulnerable to maliciously crafted gem specifications that include terminal escape characters. Printing the gem specification would execute terminal escape sequences.
Advisory Timeline
- First published May 13, 2022 (1658 days ago).
- Last revised November 8, 2023 — 544 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
gem install rubygems-update -v 2.6.13
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: RubyGems (1).
| Package | Fixed In |
|---|---|
| rubygems-update RubyGems · Affected: 0.8.10, 0.8.11, 0.8.3, 0.8.4 (+135 more) | 2.6.13 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-150
- CWE-94Code InjectionMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 9.8 score means for each attack dimension.
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
References
- https://nvd.nist.gov/vuln/detail/CVE-2017-0899ADVISORY
- https://github.com/rubygems/rubygems/commit/1bcbc7fe637b03145401ec9c094066285934a7f1WEB
- https://github.com/rubygems/rubygems/commit/ef0aa611effb5f54d40c7fba6e8235eb43c5a491WEB
- https://hackerone.com/reports/226335WEB
- https://access.redhat.com/errata/RHSA-2017:3485WEB
- https://access.redhat.com/errata/RHSA-2018:0378WEB
- https://access.redhat.com/errata/RHSA-2018:0583WEB
- https://access.redhat.com/errata/RHSA-2018:0585WEB
- https://github.com/rubygems/rubygemsPACKAGE
- https://lists.debian.org/debian-lts-announce/2018/07/msg00012.htmlWEB
- https://security.gentoo.org/glsa/201710-01WEB
- https://web.archive.org/web/20170907215801/http://www.securitytracker.com/id/1039249WEB
- https://web.archive.org/web/20170915000000*/http://www.securityfocus.com/bid/100576#:~:text=1%20snapshot-,11%3A49%3A33,-NoteWEB
- https://www.debian.org/security/2017/dsa-3966WEB
- https://blog.rubygems.org/2017/08/27/2.6.13-released.htmlWEB
Frequently Asked Questions
- What is CVE-2017-0899?
- RubyGems Code Injection vulnerability. This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.8/10).
- How do I check if my project is affected by CVE-2017-0899?
- CVE-2017-0899 affects rubygems-update. It has a 11.1% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2017-0899 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Maximum impact if exploited, often with little effort or access required.
This places it in the top 5% of EPSS-scored vulnerabilities — 96.6% of tracked vulnerabilities score at or below it, so it is far more likely to be exploited than nearly all other tracked vulnerabilities.
Also Known As
Related CVEs
- CVE-2019-8323HIGH
RubyGems Escape sequence injection vulnerability in api response handling
- CVE-2019-8325HIGH
RubyGems Escape sequence injection in errors
- CVE-2019-8320HIGH
RubyGems Delete directory using symlink when decompressing tar
- CVE-2017-0902HIGH
RubyGems has Origin Validation Error vulnerability
- CVE-2018-1000075HIGH
RubyGems Infinite Loop vulnerability
- CVE-2019-8324HIGH
Code injection in RubyGems
- CVE-2017-0901HIGH
RubyGems may allow a maliciously crafted gem to overwrite files
- CVE-2018-1000074HIGH
RubyGems Deserialization of Untrusted Data vulnerability