GitHub Advisory Database
GHSA-qv62-xfj6-32xm
RubyGems Improper Input Validation vulnerability
Details
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.
Affected packages
| Ecosystem | Package | Affected versions |
|---|---|---|
| RubyGems | rubygems-update | All versions before 2.0.17 (fixed in 2.0.17) |
| RubyGems | rubygems-update | From 2.1.0.rc.1 before 2.2.5 (fixed in 2.2.5) |
| RubyGems | rubygems-update | From 2.3.0 before 2.4.8 (fixed in 2.4.8) |
References
- https://nvd.nist.gov/vuln/detail/CVE-2015-4020
- https://github.com/rubygems/rubygems/commit/5c7bfb5
- https://github.com/rubygems/rubygems
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rubygems-update/CVE-2015-4020.yml
- https://puppet.com/security/cve/CVE-2015-3900
- https://web.archive.org/web/20200228084212/http://www.securityfocus.com/bid/75431
- https://web.archive.org/web/20200228085830/https://puppet.com/security/cve/CVE-2015-3900
- https://www.trustwave.com/Resources/Security-Advisories/Advisories/TWSL2015-009/?fid=6478
- https://www.trustwave.com/Resources/SpiderLabs-Blog/Attacking-Ruby-Gem-Security-with-CVE-2015-3900
- http://blog.rubygems.org/2015/06/08/2.2.5-released.html
- http://blog.rubygems.org/2015/06/08/2.4.8-released.html
- http://www.oracle.com/technetwork/topics/security/bulletinoct2015-2511968.html
- http://www.securityfocus.com/bid/75431