CVE-2015-3900: Rubygems update RubyGems Vulnerable To DNS Hijack Vulnerability

HIGH
Advisory Identifier: GHSA-wp3j-rvfp-624h
CWE-350
Published
Advisory Summary

CVE-2015-3900 is a HIGH rubygems vulnerable to dns hijack vulnerability (CWE-350: Reliance on Reverse DNS Resolution for a Security-Critical Action) affecting Rubygems update libraries in the RubyGems ecosystem. The issue involves rubygems vulnerable to dns hijack attack. Remediation is available by upgrading affected packages to version 2.0.16, 2.2.4, 2.4.7.

CVE-2015-3900 at a Glance

CVE Identifier CVE-2015-3900
GHSA Identifier GHSA-wp3j-rvfp-624h
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-350: Reliance on Reverse DNS Resolution for a Security-Critical Action
Affected Product Rubygems update
Package Ecosystem RubyGems
Published Date
Last Updated

How to Fix CVE-2015-3900

To remediate this vulnerability, upgrade all affected Rubygems update dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

rubygems-update fixed: 2.0.16
Upgrade rubygems-update to 2.0.16
rubygems-update fixed: 2.2.4
Upgrade rubygems-update to 2.2.4
rubygems-update fixed: 2.4.7
Upgrade rubygems-update to 2.4.7
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for rubygems-update

How to Check if You Are Affected

To determine whether your application is affected by CVE-2015-3900, inspect your project dependencies for Rubygems update:

inspect dependencies for rubygems-update

Analyze the terminal output to locate any version of Rubygems update in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.16), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-350: Reliance on Reverse DNS Resolution for a Security-Critical Action, where the product performs reverse dns resolution on an ip address to obtain the hostname and make a security decision, but it does not properly ensure that the ip address is truly associated with the hostname. In Rubygems update, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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."

CVE-2015-3900 Affected Rubygems update Versions

3 component(s)
Fixed Versions:
2.0.162.2.42.4.7
Product / Package Ecosystem Affected Versions Fixed Version
rubygems-update
RubyGems
≥ 2.0.0
< 2.0.16
2.0.16
rubygems-update
RubyGems
≥ 2.2.0
< 2.2.4
2.2.4
rubygems-update
RubyGems
≥ 2.4.0
< 2.4.7
2.4.7

References

NVD — CVE-2015-3900 NVD
https://nvd.nist.gov/vuln/detail/CVE-2015-3900
Rubygems update Source Repository REPOSITORY
https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rubygems-update/CVE-2015-3900.yml
Rubygems update Security Information SECURITY
https://puppet.com/security/cve/CVE-2015-3900
Rubygems update Security Information SECURITY
https://web.archive.org/web/20170331091241/https://puppet.com/security/cve/CVE-2015-3900
Rubygems update Security Information SECURITY
https://web.archive.org/web/20200228055155/http://www.securityfocus.com/bid/75482
Rubygems update Security Information SECURITY
https://www.trustwave.com/Resources/Security-Advisories/Advisories/TWSL2015-007/?fid=6356
Rubygems update Security Information SECURITY
https://www.trustwave.com/Resources/SpiderLabs-Blog/Attacking-Ruby-Gem-Security-with-CVE-2015-3900
blog.rubygems.org/2015/05/14/cve-2015... WEB
http://blog.rubygems.org/2015/05/14/CVE-2015-3900.html
lists.fedoraproject.org/pipermail/package-a... WEB
http://lists.fedoraproject.org/pipermail/package-announce/2015-August/163502.html
lists.fedoraproject.org/pipermail/package-a... WEB
http://lists.fedoraproject.org/pipermail/package-announce/2015-August/163600.html
lists.fedoraproject.org/pipermail/package-a... WEB
http://lists.fedoraproject.org/pipermail/package-announce/2015-August/164236.html
rhn.redhat.com/errata/rhsa-2015-16... WEB
http://rhn.redhat.com/errata/RHSA-2015-1657.html
Rubygems update Security Information SECURITY
http://www.openwall.com/lists/oss-security/2015/06/26/2
Rubygems update Security Information SECURITY
http://www.oracle.com/technetwork/topics/security/bulletinoct2015-2511968.html

Frequently Asked Questions

What is CVE-2015-3900?
CVE-2015-3900 is a security vulnerability in Rubygems update involving RubyGems vulnerable to DNS hijack attack under CWE-350: Reliance on Reverse DNS Resolution for a Security-Critical Action.
Which Rubygems update versions are affected?
Affected versions include releases prior to 2.0.16, 2.2.4, 2.4.7 across affected packages: rubygems-update.
What version fixes CVE-2015-3900?
Upgrading to 2.0.16, 2.2.4, 2.4.7 (or the latest patched release for your respective branch) resolves the vulnerability.
Is rubygems-update affected?
Yes, rubygems-update is affected in releases prior to 2.0.16, 2.2.4, 2.4.7. Upgrade your dependency to 2.0.16, 2.2.4, 2.4.7 or later.
What CWE is associated with CVE-2015-3900?
CVE-2015-3900 is classified under CWE-350: Reliance on Reverse DNS Resolution for a Security-Critical Action (The product performs reverse DNS resolution on an IP address to obtain the hostname and make a security decision, but it does not properly ensure that the IP address is truly associated with the hostname.).
How can I check RubyGems dependencies for CVE-2015-3900?
Run the dependency tree command: 'inspect dependencies for rubygems-update'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-wp3j-rvfp-624h",
  "modified" : "2023-03-10T02:29:09Z",
  "published" : "2022-05-14T01:08:49Z",
  "aliases" : [ "CVE-2015-3900" ],
  "summary" : "RubyGems vulnerable to DNS hijack attack",
  "details" : "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.\"",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "rubygems-update"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0"
      }, {
        "fixed" : "2.0.16"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "rubygems-update"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.2.0"
      }, {
        "fixed" : "2.2.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "rubygems-update"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.4.0"
      }, {
        "fixed" : "2.4.7"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2015-3900"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rubygems-update/CVE-2015-3900.yml"
  }, {
    "type" : "WEB",
    "url" : "https://puppet.com/security/cve/CVE-2015-3900"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20170331091241/https://puppet.com/security/cve/CVE-2015-3900"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20200228055155/http://www.securityfocus.com/bid/75482"
  }, {
    "type" : "WEB",
    "url" : "https://www.trustwave.com/Resources/Security-Advisories/Advisories/TWSL2015-007/?fid=6356"
  }, {
    "type" : "WEB",
    "url" : "https://www.trustwave.com/Resources/SpiderLabs-Blog/Attacking-Ruby-Gem-Security-with-CVE-2015-3900"
  }, {
    "type" : "WEB",
    "url" : "http://blog.rubygems.org/2015/05/14/CVE-2015-3900.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.fedoraproject.org/pipermail/package-announce/2015-August/163502.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.fedoraproject.org/pipermail/package-announce/2015-August/163600.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.fedoraproject.org/pipermail/package-announce/2015-August/164236.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2015-1657.html"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2015/06/26/2"
  }, {
    "type" : "WEB",
    "url" : "http://www.oracle.com/technetwork/topics/security/bulletinoct2015-2511968.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-350" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-03-10T02:29:09Z",
    "nvd_published_at" : "2015-06-24T14:59:00Z"
  }
}