Every CVESearch/Get API key

CVE-2015-4020

RubyGems Improper Input Validation vulnerability

4.3 MediumFix available

CVE-2015-4020 is a medium vulnerability (CVSS 4.3) in Rubygems, published August 25, 2015. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 3.46%, the 89th percentile. Fixed in rubygems-update 2.0.17.

What does this mean?
Severity
4.3 MediumCVSS 2.0, NVD
Exploit chance
3.46%EPSS, 89th percentile
Exploitation
None knownNot on CISA’s or ENISA’s lists

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.

Exploit likelihood

3.46%Up 2.1 points since Feb 4, 2022
90%50%10%1%

Affected products

Affected packages

Affected packages
PackageAffectedFixed
rubygems-update
RubyGems
before 2.0.17
2.0.17
rubygems-update
RubyGems
2.1.0.rc.1 up to 2.2.5
2.2.5
rubygems-update
RubyGems
2.3.0 up to 2.4.8
2.4.8
rubygems-update
RubyGems
before 2.0.17, plus listed versions
0.8.100.8.110.8.30.8.40.8.5
Show 45 moreShow less
0.8.60.8.80.9.00.9.10.9.20.9.30.9.40.9.51.0.01.0.11.1.01.1.11.2.01.3.01.3.11.3.21.3.31.3.41.3.51.3.61.3.71.4.01.4.11.4.21.5.01.5.21.5.31.6.01.6.11.6.21.7.01.7.11.7.21.8.01.8.11.8.101.8.111.8.121.8.131.8.141.8.151.8.161.8.171.8.181.8.19
2.0.17
rubygems-update
RubyGems
2.1.0.rc.1 up to 2.2.5, plus listed versions
2.1.02.1.0.rc.22.1.12.1.102.1.11
Show 14 moreShow less
2.1.22.1.32.1.42.1.52.1.62.1.72.1.82.1.92.2.02.2.0.rc.12.2.12.2.22.2.32.2.4
2.2.5
rubygems-update
RubyGems
2.3.0 up to 2.4.8, plus listed versions
2.4.02.4.12.4.22.4.32.4.42.4.52.4.62.4.7
2.4.8

What each source reports

NVD Score used4.3

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.

Record
CVE-2015-4020
CVSS 2.0
4.3 MediumAV:N/AC:M/Au:N/C:N/I:P/A:N
Weakness
CWE-20
Updated
2026-11-02
CVE ListNo score

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.

Record
CVE-2015-4020
Updated
2026-11-02
EUVDEUVD-2022-5031No score

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.

Record
EUVD-2022-5031
Updated
2026-11-03
GitHub AdvisoriesGHSA-qv62-xfj6-32xmNo score

RubyGems Improper Input Validation vulnerability

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.

Record
GHSA-qv62-xfj6-32xm
Weakness
CWE-20
Updated
2026-11-02
OSVGHSA-qv62-xfj6-32xmNo score

RubyGems Improper Input Validation vulnerability

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.

Record
GHSA-qv62-xfj6-32xm
Weakness
CWE-20
Updated
2026-11-02

History

History
RecordedChangedSources
facts
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

References

Show 8 moreShow less
This page doesn't list everything

Left out here: 41 versions. The JSON record has them.

MoveEnter Open