CVE-2015-4020

Description

RubyGems 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.

Severity
not scored
CVSS v3
not scored
Exploit chance (EPSS)
3.461%
chance of exploitation in the next 30 days
higher than 89.3% of scored CVEs · 2026-11-17
CISA KEV
Not listed
Public exploit code
None public
Exploit references (NVD and CNA): 0
Metasploit modules: 0
Nuclei templates: 0

Weakness

Timeline

  1. 2015-08-25Published by the CNA17:00 UTC
  2. 2022-05-17GitHub advisory published (GHSA-qv62-xfj6-32xm)2457 days after publication

The timeline shows what already happened. To be told when this CVE changes next, watch it from the API.

Exploit and advisory records

GitHub advisory GHSA-qv62-xfj6-32xm, affected packages:

EcosystemPackageVulnerable rangePatched
RubyGemsrubygems-update< 2.0.172.0.17
RubyGemsrubygems-update>= 2.1.0.rc.1, < 2.2.52.2.5
RubyGemsrubygems-update>= 2.3.0, < 2.4.82.4.8

Affected products

VendorProduct
oraclesolaris
rubygemsrubygems

References

Get more CVE data from the API.

Free without a key or signup. Pro adds monitoring and higher limits: pricing.

Sources