RubySec

Providing security resources for the Ruby community

CVE-2015-3900 (rubygems-update): CVE-2015-3900 rubygems: DNS hijacking vulnerability in api_endpoint()

ADVISORIES

GEM

rubygems-update

LIBRARY

RubyGems

SEVERITY

CVSS v2.0: 5.0 (Medium)

PATCHED VERSIONS

  • ~> 2.0.16
  • ~> 2.2.4
  • >= 2.4.7

DESCRIPTION

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." A flaw was found in a way rubygems verified the API endpoint hostname retrieved through a DNS SRV record. A man-in-the-middle attacker could use this flaw to force a client to download content from an untrusted domain.