CVE-2015-3900: Medium severity ruby-lang Ruby vulnerability
RubyGems 2.0.x before 2.0.16, 2.2.x before 2.2.4, and 2.4.x before 2.4.7 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, aka a "DNS hijack attack."
Other sources
RubyGems before versions 2.0.16, 2.2.4 and 2.4.7 did not verify the API endpoint hostname retrieved through an SRV record. This left clients open to a DNS hijack attack, whereby an attacker could return a SRV of their choosing and get the client to use it.
Upstream patch: https://github.com/rubygems/rubygems/commit/6bbee35
External References:
http://blog.rubygems.org/2015/05/14/CVE-2015-3900.html
Statement:
This issue did not affect the versions of rubygems as shipped with Red Hat Enterprise Linux 6, Red Hat Enterprise MRG 2.5, Red Hat Satellite 6, Red Hat Openstack 5, Red Hat Openshift Enterprise 2 as they did not include support for getting API endpoint using SRV DNS records.
This issue did not affect the versions of ruby as shipped with Red Hat Enterprise Linux 5 and 6 as they did not include support for getting API endpoint using SRV DNS records. The issue did not affect version of ruby as shipped with Red Hat Enterprise Linux 7, as the support for getting API endpoint using SRV DNS records is included, but inactive.
This issue did not affect the versions of ruby193-ruby as shipped with Red Hat Subscription Asset Manager and Red Hat Software Collections as they did not include support for getting API endpoint using SRV DNS records.
The issue did not affect version of ruby200-ruby as shipped with Red Hat Software Collections, as the support for getting API endpoint using SRV DNS records is included, but inactive.
— Red Hat
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
rubygems/rubygems-updateto a version that resolves this vulnerability.Fixed in 2.4.7 - Upgrade
Upgrade
rubygems/rubygems-updateto a version that resolves this vulnerability.Fixed in 2.2.4 - Upgrade
Upgrade
rubygems/rubygems-updateto a version that resolves this vulnerability.Fixed in 2.0.16 - Upgrade
Upgrade
redhat/rubygemsto a version that resolves this vulnerability.Fixed in 2.0.16 - Upgrade
Upgrade
redhat/rubygemsto a version that resolves this vulnerability.Fixed in 2.2.4 - Upgrade
Upgrade
redhat/rubygemsto a version that resolves this vulnerability.Fixed in 2.4.7 - Upgrade
Upgrade
RubyGemsto a version that resolves this vulnerability.Fixed in 2.0.16 - Upgrade
Upgrade
RubyGemsto a version that resolves this vulnerability.Fixed in 2.2.4 - Upgrade
Upgrade
RubyGemsto a version that resolves this vulnerability.Fixed in 2.4.7
Event History
Frequently Asked Questions
What is the severity of CVE-2015-3900?
CVE-2015-3900 has a moderate severity rating due to the potential for DNS hijack attacks.
How do I fix CVE-2015-3900?
To fix CVE-2015-3900, upgrade RubyGems to version 2.0.16, 2.2.4, or 2.4.7 or later.
What versions are affected by CVE-2015-3900?
CVE-2015-3900 affects RubyGems versions 2.0.x before 2.0.16, 2.2.x before 2.2.4, and 2.4.x before 2.4.7.
What does CVE-2015-3900 exploit?
CVE-2015-3900 exploits vulnerabilities in RubyGems' hostname validation when fetching gems or making API requests.
Who can be impacted by CVE-2015-3900?
Users of RubyGems versions prior to the patched versions are at risk of being impacted by CVE-2015-3900.