CWE
20
Advisory Published
Advisory Published
Updated

CVE-2015-4020: Input Validation

First published: Tue Aug 25 2015(Updated: )

RubyGems 2.0.x before 2.0.17, 2.2.x before 2.2.5, and 2.3.x before 2.4.8 does not validate the hostname when fetching gems or making API requests, which allows remote attackers to redirect requests to arbitrary domains via a crafted DNS SRV record with a domain that is suffixed with the original domain name, aka a "DNS hijack attack." NOTE: this vulnerability exists because of an incomplete fix for CVE-2015-3900.

Credit: cve@mitre.org

Affected SoftwareAffected VersionHow to fix
rubygems/rubygems-update>=2.3.0<2.4.8
2.4.8
rubygems/rubygems-update>=2.1.0.rc.1<2.2.5
2.2.5
rubygems/rubygems-update<2.0.17
2.0.17
Oracle Solaris and Zettabyte File System (ZFS)=11.3
RubyGems=2.0.0
RubyGems=2.0.0-preview2
RubyGems=2.0.0-preview2.1
RubyGems=2.0.0-preview2.2
RubyGems=2.0.0-rc1
RubyGems=2.0.0-rc2
RubyGems=2.0.1
RubyGems=2.0.2
RubyGems=2.0.3
RubyGems=2.0.4
RubyGems=2.0.5
RubyGems=2.0.6
RubyGems=2.0.7
RubyGems=2.0.8
RubyGems=2.0.9
RubyGems=2.0.10
RubyGems=2.0.11
RubyGems=2.0.12
RubyGems=2.0.13
RubyGems=2.0.14
RubyGems=2.0.15
RubyGems=2.0.16
RubyGems=2.2.0
RubyGems=2.2.1
RubyGems=2.2.2
RubyGems=2.2.3
RubyGems=2.2.4
RubyGems=2.4.0
RubyGems=2.4.1
RubyGems=2.4.2
RubyGems=2.4.3
RubyGems=2.4.4
RubyGems=2.4.5
RubyGems=2.4.6
RubyGems=2.4.7

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Frequently Asked Questions

  • What is the severity of CVE-2015-4020?

    CVE-2015-4020 is rated as a high severity vulnerability due to its potential to allow remote attackers to redirect requests.

  • How do I fix CVE-2015-4020?

    To fix CVE-2015-4020, update RubyGems to version 2.4.8, 2.2.5, or 2.0.17 or later.

  • Which versions of RubyGems are affected by CVE-2015-4020?

    CVE-2015-4020 affects RubyGems versions 2.0.x before 2.0.17, 2.2.x before 2.2.5, and 2.3.x before 2.4.8.

  • What kind of attacks can CVE-2015-4020 facilitate?

    CVE-2015-4020 allows remote attackers to execute DNS spoofing attacks by redirecting requests to arbitrary domains.

  • Is CVE-2015-4020 specific to any operating system?

    CVE-2015-4020 is not limited to a specific operating system but impacts all platforms using affected RubyGems versions.

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.
© 2025 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203