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.
Predictions
Heuristic predictions, AS-IS, for prioritization only.
Mitigations
No mitigations published for this CVE yet.
The vendor-content worker queues fetches as references arrive (check back in a few minutes). Or โ if you've already worked around this in production โ publish your fix to the community-verified tier.
โ Propose a mitigation on Community โ Mitigations published via the community go through AI scoring + 2 human reviewers + 7-day silent objection window before landing here withsource_tier=community-verified.
OS impact
Debian Fixed 5 releases
| Version | Status | Fixed in |
|---|---|---|
| trixie | Fixed | 0 |
| sid | Fixed | 0 |
| forky | Fixed | 0 |
| bullseye | Fixed | 0 |
| bookworm | Fixed | 0 |
Package impact
| Ecosystem | Package | Vulnerable | Fixed |
|---|---|---|---|
| RubyGems | rubygems-update | <~> 2.0.17 | ~> 2.0.17 |
| RubyGems | rubygems-update | <2.0.17 | 2.0.17 |
| RubyGems | rubygems-update | >=2.1.0.rc.1,<2.2.5 | 2.2.5 |
| RubyGems | rubygems-update | >=2.3.0,<2.4.8 | 2.4.8 |
Application impact
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| rubygems | rubygems | 2.0.0 | |
| rubygems | rubygems | 2.0.1 | |
| rubygems | rubygems | 2.0.2 | |
| rubygems | rubygems | 2.0.3 | |
| rubygems | rubygems | 2.0.4 | |
| rubygems | rubygems | 2.0.5 | |
| rubygems | rubygems | 2.0.6 | |
| rubygems | rubygems | 2.0.7 | |
| rubygems | rubygems | 2.0.8 | |
| rubygems | rubygems | 2.0.9 | |
| rubygems | rubygems | 2.0.10 | |
| rubygems | rubygems | 2.0.11 | |
| rubygems | rubygems | 2.0.12 | |
| rubygems | rubygems | 2.0.13 | |
| rubygems | rubygems | 2.0.14 | |
| rubygems | rubygems | 2.0.15 | |
| rubygems | rubygems | 2.0.16 | |
| rubygems | rubygems | 2.2.0 | |
| rubygems | rubygems | 2.2.1 | |
| rubygems | rubygems | 2.2.2 | |
| rubygems | rubygems | 2.2.3 | |
| rubygems | rubygems | 2.2.4 | |
| rubygems | rubygems | 2.4.0 | |
| rubygems | rubygems | 2.4.1 | |
| rubygems | rubygems | 2.4.2 | |
| rubygems | rubygems | 2.4.3 | |
| rubygems | rubygems | 2.4.4 | |
| rubygems | rubygems | 2.4.5 | |
| rubygems | rubygems | 2.4.6 | |
| rubygems | rubygems | 2.4.7 | |
References
- https://www.trustwave.com/Resources/Security-Advisories/Advisories/TWSL2015-009/?fid=6478
- 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
- https://github.com/rubygems/rubygems/commit/5c7bfb5
- https://puppet.com/security/cve/CVE-2015-3900
- https://www.trustwave.com/Resources/SpiderLabs-Blog/Attacking-Ruby-Gem-Security-with-CVE-2015-3900/
- https://security-tracker.debian.org/tracker/CVE-2015-4020
- https://nvd.nist.gov/vuln/detail/CVE-2015-4020
- https://github.com/rubygems/rubygems
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rubygems-update/CVE-2015-4020.yml
- 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/SpiderLabs-Blog/Attacking-Ruby-Gem-Security-with-CVE-2015-3900
CWEs
CWE-20
Community-verified mitigations for this CVE will appear above when contributors publish them.
Verify integrity in audit chain (admin only). AS-IS.