CVE-2017-0902: High severity Rubygems RubyGems vulnerability

Published Aug 31, 2017
·
Updated

Last updated 11 July 2025

Other sources

RubyGems version 2.6.12 and earlier is vulnerable to a DNS hijacking vulnerability that allows a MITM attacker to force the RubyGems client to download and install gems from a server that the attacker controls.

Upstream patches:

https://github.com/rubygems/rubygems/commit/8d91516fb7037ecfb27622f605dc40245e0f8d32

Bug report:

https://hackerone.com/reports/218088

External References:

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

— Red Hat

Affected Software

47 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
Canonical Ubuntu Linux=14.04
Canonical Ubuntu Linux=16.04
Canonical Ubuntu Linux=17.10
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
debian/rubygems
3.2.0~rc.1-1
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 debian/rubygems to a version that resolves this vulnerability.

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

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

    Fixed in 2.1.5-2+deb8u4
  11. Upgrade

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

    Fixed in 2.3.3-1+deb9u1
  12. 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
Updated
via Ubuntu·12:00 AM
RemedyDescriptionAffected Software
Updated
via Ubuntu·12:00 AM
Description
CVE Published
via MITRE·08:00 PM
Data Sourced
via OSV·08:29 PM
DescriptionSeverityAffected Software
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-0902?

CVE-2017-0902 is a DNS hijacking vulnerability in RubyGems version 2.6.12 and earlier.

2

How does CVE-2017-0902 work?

CVE-2017-0902 allows a MITM attacker to force the RubyGems client to download and install gems from a server that the attacker controls.

3

What is the severity of CVE-2017-0902?

CVE-2017-0902 has a severity score of 8.1 (high).

4

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

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

5

How do I fix CVE-2017-0902?

To fix CVE-2017-0902, upgrade to RubyGems version 2.6.13 or later.

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