CVE-2015-4020

Summary

CVECVE-2015-4020
StatePUBLISHED
Assignermitre
Source PriorityCVE Program / NVD first with legacy fallback
Published2015-08-25 17:59:01 UTC
Updated2026-05-06 22:30:45 UTC
DescriptionRubyGems 2.0.x before 2.0.17, 2.2.x before 2.2.5, and 2.4.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 to an incomplete fix for CVE-2015-3900.

Risk And Classification

Primary CVSS: v2.0 4.3 from [email protected]

AV:N/AC:M/Au:N/C:N/I:P/A:N

Problem Types: CWE-20 | n/a

CVSS v2.0 Breakdown

Access Vector
Network
Access Complexity
Medium
Authentication
None
Confidentiality
None
Integrity
Partial
Availability
None

AV:N/AC:M/Au:N/C:N/I:P/A:N

NVD Known Affected Configurations (CPE 2.3)

TypeVendorProductVersionUpdateEditionLanguage
Operating System Oracle Solaris 11.3 All All All
Application Rubygems Rubygems 2.0.0 All All All
Application Rubygems Rubygems 2.0.0 preview2 All All
Application Rubygems Rubygems 2.0.0 preview2.1 All All
Application Rubygems Rubygems 2.0.0 preview2.2 All All
Application Rubygems Rubygems 2.0.0 rc1 All All
Application Rubygems Rubygems 2.0.0 rc2 All All
Application Rubygems Rubygems 2.0.1 All All All
Application Rubygems Rubygems 2.0.10 All All All
Application Rubygems Rubygems 2.0.11 All All All
Application Rubygems Rubygems 2.0.12 All All All
Application Rubygems Rubygems 2.0.13 All All All
Application Rubygems Rubygems 2.0.14 All All All
Application Rubygems Rubygems 2.0.15 All All All
Application Rubygems Rubygems 2.0.16 All All All
Application Rubygems Rubygems 2.0.2 All All All
Application Rubygems Rubygems 2.0.3 All All All
Application Rubygems Rubygems 2.0.4 All All All
Application Rubygems Rubygems 2.0.5 All All All
Application Rubygems Rubygems 2.0.6 All All All
Application Rubygems Rubygems 2.0.7 All All All
Application Rubygems Rubygems 2.0.8 All All All
Application Rubygems Rubygems 2.0.9 All All All
Application Rubygems Rubygems 2.2.0 All All All
Application Rubygems Rubygems 2.2.1 All All All
Application Rubygems Rubygems 2.2.2 All All All
Application Rubygems Rubygems 2.2.3 All All All
Application Rubygems Rubygems 2.2.4 All All All
Application Rubygems Rubygems 2.4.0 All All All
Application Rubygems Rubygems 2.4.1 All All All
Application Rubygems Rubygems 2.4.2 All All All
Application Rubygems Rubygems 2.4.3 All All All
Application Rubygems Rubygems 2.4.4 All All All
Application Rubygems Rubygems 2.4.5 All All All
Application Rubygems Rubygems 2.4.6 All All All
Application Rubygems Rubygems 2.4.7 All All All

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Na N/a affected n/a Not specified

References

ReferenceSourceLinkTags
Fix API endpoint domain clamping · rubygems/rubygems@5c7bfb5 · GitHub af854a3a-2127-422b-91ae-364da2661108 github.com
www.trustwave.com/Resources/Security-Advisories/Advisories/TWSL2015-009 af854a3a-2127-422b-91ae-364da2661108 www.trustwave.com Third Party Advisory
2.2.5 Released | RubyGems.org af854a3a-2127-422b-91ae-364da2661108 blog.rubygems.org Vendor Advisory
CVE-2015-3900, CVE-2015-4020 - Request Hijacking Vulnerability in RubyGems | Puppet af854a3a-2127-422b-91ae-364da2661108 puppet.com
Oracle Solaris Third Party Bulletin - October 2015 af854a3a-2127-422b-91ae-364da2661108 www.oracle.com Third Party Advisory
RubyGems CVE-2015-4020 Incomplete Fix Security Bypass Vulnerability af854a3a-2127-422b-91ae-364da2661108 www.securityfocus.com
2.4.8 Released | RubyGems.org af854a3a-2127-422b-91ae-364da2661108 blog.rubygems.org Vendor Advisory
Attacking Ruby Gem Security with CVE-2015-3900 af854a3a-2127-422b-91ae-364da2661108 www.trustwave.com Third Party Advisory
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report