CVE-2017-0899: Code Injection

Published Aug 31, 2017
·
Updated

Last updated 24 July 2024

Other sources

RubyGems version 2.6.12 and earlier is vulnerable to maliciously crafted gem specifications that include terminal escape characters. Printing the gem specification would execute terminal escape sequences.

Upstream patches:

https://github.com/rubygems/rubygems/commit/1bcbc7fe637b03145401ec9c094066285934a7f1 https://github.com/rubygems/rubygems/commit/ef0aa611effb5f54d40c7fba6e8235eb43c5a491

Bug report:

https://hackerone.com/reports/226335

External References:

http://blog.rubygems.org/2017/08/27/2.6.13-released.html

— Red Hat

Affected Software

52 affected componentsFixes available
redhat/rubygems<2.6.13
2.6.13
redhat/ruby<2.4.2
2.4.2
redhat/ruby<2.2.8
2.2.8
redhat/ruby<2.3.5
2.3.5
Rubygems RubyGems<=2.6.12
Debian Debian Linux=8.0
Debian Debian Linux=9.0
redhat Enterprise Linux Desktop=7.0
redhat Enterprise Linux Server=7.0
redhat Enterprise Linux Server Aus=7.4
redhat Enterprise Linux Server Aus=7.6
redhat Enterprise Linux Server Eus=7.4
redhat Enterprise Linux Server Eus=7.5
redhat Enterprise Linux Server Eus=7.6
redhat Enterprise Linux Server Tus=7.4
redhat Enterprise Linux Server Tus=7.6
redhat Enterprise Linux Workstation=7.0
alpine/ruby<2.4.2-r0
2.4.2-r0
alpine/ruby<2.4.2-r0
2.4.2-r0
alpine/ruby<2.4.2-r0
2.4.2-r0
alpine/ruby<2.4.2-r0
2.4.2-r0
alpine/ruby<2.4.2-r0
2.4.2-r0
alpine/ruby<2.4.2-r0
2.4.2-r0
alpine/ruby<2.4.2-r0
2.4.2-r0
alpine/ruby<2.4.2-r0
2.4.2-r0
alpine/ruby<2.4.2-r0
2.4.2-r0
alpine/ruby<2.4.2-r0
2.4.2-r0
alpine/ruby<2.4.2-r0
2.4.2-r0
alpine/ruby<2.4.2-r0
2.4.2-r0
alpine/ruby<2.4.2-r0
2.4.2-r0
alpine/ruby<2.4.2-r0
2.4.2-r0
alpine/ruby<2.4.2-r0
2.4.2-r0
alpine/ruby<2.2.8-r0
2.2.8-r0
alpine/ruby<2.3.5-r0
2.3.5-r0
alpine/ruby<2.3.5-r0
2.3.5-r0
alpine/ruby<2.4.2-r0
2.4.2-r0
alpine/ruby<2.4.2-r0
2.4.2-r0
alpine/ruby<2.4.2-r0
2.4.2-r0
alpine/ruby<2.4.2-r0
2.4.2-r0
alpine/ruby2.2<2.2.8-r0
2.2.8-r0
alpine/ruby2.2<2.2.8-r0
2.2.8-r0
ubuntu/ruby1.9.1<1.9.3.484-2ubuntu1.5
1.9.3.484-2ubuntu1.5
ubuntu/jruby*
ubuntu/ruby2.3<2.3.1-2~16.04.6
2.3.1-2~16.04.6
ubuntu/jruby*
ubuntu/jruby*
ubuntu/jruby*
ubuntu/jruby*
debian/rubygems
3.2.0~rc.1-1
debian/ruby1.9.1
1.9.3.194-8.1+deb7u6
debian/ruby2.1
2.1.5-2+deb8u4
debian/ruby2.3
2.3.3-1+deb9u1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade redhat/rubygems to a version that resolves this vulnerability.

    Fixed in 2.6.13
  2. Upgrade

    Upgrade redhat/ruby to a version that resolves this vulnerability.

    Fixed in 2.4.2
  3. Upgrade

    Upgrade redhat/ruby to a version that resolves this vulnerability.

    Fixed in 2.2.8
  4. Upgrade

    Upgrade redhat/ruby to a version that resolves this vulnerability.

    Fixed in 2.3.5
  5. Upgrade

    Upgrade alpine/ruby to a version that resolves this vulnerability.

    Fixed in 2.4.2-r0
  6. Upgrade

    Upgrade alpine/ruby to a version that resolves this vulnerability.

    Fixed in 2.2.8-r0
  7. Upgrade

    Upgrade alpine/ruby to a version that resolves this vulnerability.

    Fixed in 2.3.5-r0
  8. Upgrade

    Upgrade alpine/ruby2.2 to a version that resolves this vulnerability.

    Fixed in 2.2.8-r0
  9. Upgrade

    Upgrade ubuntu/ruby1.9.1 to a version that resolves this vulnerability.

    Fixed in 1.9.3.484-2ubuntu1.5
  10. Upgrade

    Upgrade ubuntu/ruby2.3 to a version that resolves this vulnerability.

    Fixed in 2.3.1-2~16.04.6
  11. Upgrade

    Upgrade debian/rubygems to a version that resolves this vulnerability.

    Fixed in 3.2.0~rc.1-1
  12. Upgrade

    Upgrade debian/ruby1.9.1 to a version that resolves this vulnerability.

    Fixed in 1.9.3.194-8.1+deb7u6
  13. Upgrade

    Upgrade debian/ruby2.1 to a version that resolves this vulnerability.

    Fixed in 2.1.5-2+deb8u4
  14. Upgrade

    Upgrade debian/ruby2.3 to a version that resolves this vulnerability.

    Fixed in 2.3.3-1+deb9u1
  15. Upgrade

    Upgrade RubyGems to a version that resolves this vulnerability.

    Fixed in 2.6.13

Event History

Aug 27, 2017
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
DescriptionWeakness
Aug 31, 2017
Data Sourced
12:00 AM
RemedyDescriptionSeverityAffected Software
Data Sourced
via OSV·12:00 AM
DescriptionSeverityAffected Software
Updated
via Ubuntu·12:00 AM
RemedyDescriptionAffected Software
CVE Published
via MITRE·08:00 PM
Oct 9, 2019
Data Sourced
11:21 PM
Weakness
Data Sourced
via NVD·11:21 PM
RemedyDescriptionSeverityWeaknessAffected Software
Updated
11:21 PM
Affected Software
Mar 11, 2021
Data Sourced
via Red Hat·03:42 PM
DescriptionSeverityAffected Software
Nov 21, 2024
Updated
via NVD·03:03 AM
RemedyAffected Software
Apr 20, 2025
Updated
via NVD·01:37 AM
Affected Software
Jun 17, 2026
Updated
via NVD·12:58 AM
Affected Software

Parent advisories

This vulnerability appears in the following advisories.

Peer vulnerabilities

Found alongside the following vulnerabilities.

Frequently Asked Questions

1

What is CVE-2017-0899?

CVE-2017-0899 refers to a vulnerability in RubyGems version 2.6.12 and earlier that allows maliciously crafted gem specifications to execute terminal escape sequences.

2

How severe is the vulnerability CVE-2017-0899?

The severity of vulnerability CVE-2017-0899 is critical with a severity score of 9.8.

3

Which software versions are affected by CVE-2017-0899?

RubyGems version 2.6.12 and earlier are affected by CVE-2017-0899.

4

How can I fix the vulnerability CVE-2017-0899?

To fix the vulnerability CVE-2017-0899, update RubyGems to version 2.6.13 or later.

5

Where can I find more information about CVE-2017-0899?

You can find more information about CVE-2017-0899 in the references provided: [http://blog.rubygems.org/2017/08/27/2.6.13-released.html](http://blog.rubygems.org/2017/08/27/2.6.13-released.html), [https://github.com/rubygems/rubygems/commit/1bcbc7fe637b03145401ec9c094066285934a7f1](https://github.com/rubygems/rubygems/commit/1bcbc7fe637b03145401ec9c094066285934a7f1), [https://github.com/rubygems/rubygems/commit/ef0aa611effb5f54d40c7fba6e8235eb43c5a491](https://github.com/rubygems/rubygems/commit/ef0aa611effb5f54d40c7fba6e8235eb43c5a491).

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203