CVE-2015-4020 json
RubyGems Improper Input Validation vulnerability
published 2015-08-25 11 y ago modified 2026-06-17 4 mo ago also GHSA-qv62-xfj6-32xm , EUVD-2022-5031
- cvss
- 4.3
- version 2.0, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 3.5%
- EPSS 3.5% chance of exploitation in 30 days, percentile 89%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2015-4020 updated cvss 7.9
rubygems: incomplete fix for CVE-2015-3900
-
Red Hat CloudForms Management Engine 5 rubygems Red Hat OpenStack Foreman rubygems Red Hat Enterprise Linux 5 ruby Red Hat Enterprise Linux 6 ruby, ruby-ri, ruby-irb, rubygems, ruby-libs, ruby-rdoc, +1 more Red Hat Enterprise Linux 7 ruby, ruby-irb, rubygems, ruby-libs, ruby-tcltk, rubygem-json, +6 more Red Hat Enterprise Linux OpenStack Platform 5 (Icehouse) rubygemsnot affected: vulnerable code not present
+5 more productsfewer
Red Hat Enterprise MRG 2 rubygems Red Hat OpenShift Enterprise 2 rubygems Red Hat Satellite 6 rubygems Red Hat Software Collections ruby193-ruby, ruby200-ruby, rh-ruby22-ruby, ruby193-ruby-irb, ruby193-rubygems, ruby200-ruby-irb, +31 more Red Hat Subscription Asset Manager ruby193-ruby
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
3.46% chance of exploitation in the next 30 days, higher than 89% of all scored CVEs (FIRST EPSS, 2026-11-09).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 2.0 | 4.3 | AV:N/AC:M/Au:N/C:N/I:P/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| rubygems | rubygems-update | <2.0.17 >=2.1.0.rc.1, <2.2.5 >=2.3.0, <2.4.8 |
2.0.17 2.2.5 2.4.8 |
Classification
- Weakness
-
- CWE-20 Improper Input Validation
References
-
github.com
/rubygems/rubygems/commit/5c7bfb5
web
-
blog.rubygems.org
/2015/06/08/2.2.5-released.html
web, vendor-advisory
-
blog.rubygems.org
/2015/06/08/2.4.8-released.html
web, vendor-advisory
-
trustwave.com
/Resources/SpiderLabs-Blog/Attacking-Ruby-Gem-Security-with-CVE-2015-3900/
third-party-advisory
-
securityfocus.com
/bid/75431
vdb-entry, web
-
trustwave.com
/Resources/Security-Advisories/Advisories/TWSL2015-009/?fid=6478
web, third-party-advisory
-
puppet.com
/security/cve/CVE-2015-3900
web
-
oracle.com
/technetwork/topics/security/bulletinoct2015-2511968.html
web, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2015-4020
advisory
-
github.com
/rubygems/rubygems
package
-
github.com
/rubysec/ruby-advisory-db/blob/master/gems/rubygems-update/CVE-2015-4020.yml
web
-
web.archive.org
/web/20200228084212/http://www.securityfocus.com/bid/75431
web
-
web.archive.org
/web/20200228085830/https://puppet.com/security/cve/CVE-2015-3900
web
-
trustwave.com
/Resources/SpiderLabs-Blog/Attacking-Ruby-Gem-Security-with-CVE-2015-3900
web
Sources
- CVE List CVE-2015-4020
- GitHub Advisory GHSA-qv62-xfj6-32xm
- NVD CVE-2015-4020
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.