{"id":"CVE-2015-4020","aliases":["EUVD-2022-5031","GHSA-qv62-xfj6-32xm"],"status":"published","title":"RubyGems Improper Input Validation vulnerability","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":{"version":"2.0","score":4.3,"vector":"AV:N/AC:M/Au:N/C:N/I:P/A:N","level":"medium","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-07","score":0.03461,"percentile":0.89116,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-20"],"published":"2015-08-25T17:00:00Z","modified":"2026-06-17T00:26:38Z","fixes":[{"ecosystem":"RubyGems","package":"rubygems-update","fixed_in":["2.0.17","2.2.5","2.4.8"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"RubyGems","package":"rubygems-update","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.0.17"}]}]},{"source":"ghsa","ecosystem":"RubyGems","package":"rubygems-update","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.1.0.rc.1"},{"fixed":"2.2.5"}]}]},{"source":"ghsa","ecosystem":"RubyGems","package":"rubygems-update","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.3.0"},{"fixed":"2.4.8"}]}]},{"source":"osv","ecosystem":"RubyGems","package":"rubygems-update","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.0.17"}]}],"versions":["0.8.10","0.8.11","0.8.3","0.8.4","0.8.5","0.8.6","0.8.8","0.9.0","0.9.1","0.9.2","0.9.3","0.9.4","0.9.5","1.0.0","1.0.1","1.1.0","1.1.1","1.2.0","1.3.0","1.3.1","1.3.2","1.3.3","1.3.4","1.3.5","1.3.6","1.3.7","1.4.0","1.4.1","1.4.2","1.5.0","1.5.2","1.5.3","1.6.0","1.6.1","1.6.2","1.7.0","1.7.1","1.7.2","1.8.0","1.8.1","1.8.10","1.8.11","1.8.12","1.8.13","1.8.14","1.8.15","1.8.16","1.8.17","1.8.18","1.8.19","1.8.2","1.8.20","1.8.21","1.8.22","1.8.23","1.8.23.2","1.8.24","1.8.25","1.8.26","1.8.27","1.8.28","1.8.29","1.8.3","1.8.30","1.8.4","1.8.5","1.8.6","1.8.7","1.8.8","1.8.9","2.0.0","2.0.0.preview2","2.0.0.preview2.1","2.0.0.preview2.2","2.0.0.rc.1","2.0.0.rc.2","2.0.10","2.0.11","2.0.12","2.0.13","2.0.14","2.0.15","2.0.16","2.0.2","2.0.3","2.0.4","2.0.5","2.0.6","2.0.7","2.0.8","2.0.9"]},{"source":"osv","ecosystem":"RubyGems","package":"rubygems-update","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.1.0.rc.1"},{"fixed":"2.2.5"}]}],"versions":["2.1.0","2.1.0.rc.1","2.1.0.rc.2","2.1.1","2.1.10","2.1.11","2.1.2","2.1.3","2.1.4","2.1.5","2.1.6","2.1.7","2.1.8","2.1.9","2.2.0","2.2.0.rc.1","2.2.1","2.2.2","2.2.3","2.2.4"]},{"source":"osv","ecosystem":"RubyGems","package":"rubygems-update","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.3.0"},{"fixed":"2.4.8"}]}],"versions":["2.3.0","2.4.0","2.4.1","2.4.2","2.4.3","2.4.4","2.4.5","2.4.6","2.4.7"]}],"products":[{"vendor":"oracle","product":"solaris"},{"vendor":"rubygems","product":"rubygems"}],"references":[{"url":"http://blog.rubygems.org/2015/06/08/2.2.5-released.html","tags":["x_refsource_CONFIRM","x_transferred","Vendor Advisory","web"]},{"url":"https://www.trustwave.com/Resources/SpiderLabs-Blog/Attacking-Ruby-Gem-Security-with-CVE-2015-3900/","tags":["x_refsource_MISC","x_transferred","Third Party Advisory"]},{"url":"http://www.securityfocus.com/bid/75431","tags":["vdb-entry","x_refsource_BID","x_transferred","web"]},{"url":"https://www.trustwave.com/Resources/Security-Advisories/Advisories/TWSL2015-009/?fid=6478","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","web"]},{"url":"http://blog.rubygems.org/2015/06/08/2.4.8-released.html","tags":["x_refsource_CONFIRM","x_transferred","Vendor Advisory","web"]},{"url":"https://github.com/rubygems/rubygems/commit/5c7bfb5","tags":["x_refsource_CONFIRM","x_transferred","web"]},{"url":"https://puppet.com/security/cve/CVE-2015-3900","tags":["x_refsource_CONFIRM","x_transferred","web"]},{"url":"http://www.oracle.com/technetwork/topics/security/bulletinoct2015-2511968.html","tags":["x_refsource_CONFIRM","x_transferred","Third Party Advisory","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2015-4020","tags":["advisory"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rubygems-update/CVE-2015-4020.yml","tags":["web"]},{"url":"https://web.archive.org/web/20200228084212/http://www.securityfocus.com/bid/75431","tags":["web"]},{"url":"https://web.archive.org/web/20200228085830/https://puppet.com/security/cve/CVE-2015-3900","tags":["web"]},{"url":"https://github.com/advisories/GHSA-qv62-xfj6-32xm"},{"url":"https://github.com/rubygems/rubygems","tags":["package"]},{"url":"https://www.trustwave.com/Resources/SpiderLabs-Blog/Attacking-Ruby-Gem-Security-with-CVE-2015-3900","tags":["web"]}],"sources":{"cve":[{"id":"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.","status":"published","published":"2015-08-25T17:00:00Z","modified":"2024-08-06T06:04:02.68Z","updated_at":"2026-11-02T14:35:43.322279Z"}],"euvd":[{"id":"EUVD-2022-5031","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.","status":"published","published":"2015-08-25T17:00:00Z","modified":"2024-08-06T06:04:02Z","updated_at":"2026-11-03T02:22:05.081899Z"}],"ghsa":[{"id":"GHSA-qv62-xfj6-32xm","title":"RubyGems Improper Input Validation vulnerability","description":"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.\"\n\nNOTE: this vulnerability exists because of an incomplete fix for CVE-2015-3900.","status":"published","published":"2022-05-17T00:16:50Z","modified":"2023-05-04T21:14:41Z","cwes":["CWE-20"],"updated_at":"2026-11-02T14:36:52.310293Z"}],"nvd":[{"id":"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.","status":"published","published":"2015-08-25T17:59:01.76Z","modified":"2026-06-17T00:26:38.357Z","cvss":[{"version":"2.0","score":4.3,"vector":"AV:N/AC:M/Au:N/C:N/I:P/A:N","level":"medium","assessor":"primary"}],"cwes":["CWE-20"],"updated_at":"2026-11-02T14:03:08.998581Z"}],"osv":[{"id":"GHSA-qv62-xfj6-32xm","title":"RubyGems Improper Input Validation vulnerability","description":"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.\"\n\nNOTE: this vulnerability exists because of an incomplete fix for CVE-2015-3900.","status":"published","published":"2022-05-17T00:16:50Z","modified":"2024-12-02T05:50:33.753196Z","cwes":["CWE-20"],"updated_at":"2026-11-02T15:46:55.122811Z"}]}}
