CVE-2015-4020: Rubygems update RubyGems Improper Input Validation Vulnerability Vulnerability
MODERATECVE-2015-4020 is a MODERATE rubygems improper input validation vulnerability vulnerability (CWE-20: Improper Input Validation) affecting Rubygems update libraries in the RubyGems ecosystem. The issue involves rubygems improper input validation vulnerability. Remediation is available by upgrading affected packages to version 2.0.17, 2.2.5, 2.4.8.
CVE-2015-4020 at a Glance
How to Fix CVE-2015-4020
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.
Upgrade rubygems-update to 2.0.17
Upgrade rubygems-update to 2.2.5
Upgrade rubygems-update to 2.4.8
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-4020, 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.17), 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-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. 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
CVE-2015-4020 Affected Rubygems update Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
rubygems-update
|
RubyGems |
< 2.0.17
|
2.0.17
|
|
rubygems-update
|
RubyGems |
≥ 2.1.0.rc.1
< 2.2.5
|
2.2.5
|
|
rubygems-update
|
RubyGems |
≥ 2.3.0
< 2.4.8
|
2.4.8
|
References
Frequently Asked Questions
What is CVE-2015-4020?
Which Rubygems update versions are affected?
What version fixes CVE-2015-4020?
Is rubygems-update affected?
What CWE is associated with CVE-2015-4020?
How can I check RubyGems dependencies for CVE-2015-4020?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-qv62-xfj6-32xm",
"modified" : "2023-05-04T21:14:40Z",
"published" : "2022-05-17T00:16:50Z",
"aliases" : [ "CVE-2015-4020" ],
"summary" : "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.\"\n\nNOTE: this vulnerability exists because of an incomplete fix for CVE-2015-3900.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "rubygems-update"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.0.17"
} ]
} ]
}, {
"package" : {
"ecosystem" : "RubyGems",
"name" : "rubygems-update"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.1.0.rc.1"
}, {
"fixed" : "2.2.5"
} ]
} ]
}, {
"package" : {
"ecosystem" : "RubyGems",
"name" : "rubygems-update"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.3.0"
}, {
"fixed" : "2.4.8"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2015-4020"
}, {
"type" : "WEB",
"url" : "https://github.com/rubygems/rubygems/commit/5c7bfb5"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/rubygems/rubygems"
}, {
"type" : "WEB",
"url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rubygems-update/CVE-2015-4020.yml"
}, {
"type" : "WEB",
"url" : "https://puppet.com/security/cve/CVE-2015-3900"
}, {
"type" : "WEB",
"url" : "https://web.archive.org/web/20200228084212/http://www.securityfocus.com/bid/75431"
}, {
"type" : "WEB",
"url" : "https://web.archive.org/web/20200228085830/https://puppet.com/security/cve/CVE-2015-3900"
}, {
"type" : "WEB",
"url" : "https://www.trustwave.com/Resources/Security-Advisories/Advisories/TWSL2015-009/?fid=6478"
}, {
"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/06/08/2.2.5-released.html"
}, {
"type" : "WEB",
"url" : "http://blog.rubygems.org/2015/06/08/2.4.8-released.html"
}, {
"type" : "WEB",
"url" : "http://www.oracle.com/technetwork/topics/security/bulletinoct2015-2511968.html"
}, {
"type" : "WEB",
"url" : "http://www.securityfocus.com/bid/75431"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-20" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-05-04T21:14:40Z",
"nvd_published_at" : "2015-08-25T17:59:00Z"
}
}