CVE-2012-2125: Rubygems update RubyGems HTTPS To HTTP Redirect Vulnerability
MODERATECVE-2012-2125 is a MODERATE rubygems https to http redirect vulnerability (General Security Weakness) affecting Rubygems update libraries in the RubyGems ecosystem. The issue involves rubygems https to http redirect. Remediation is available by upgrading affected packages to version 1.8.23.
CVE-2012-2125 at a Glance
How to Fix CVE-2012-2125
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 1.8.23
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-2012-2125, 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 1.8.23), 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 General Security Weakness. 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-2012-2125 Affected Rubygems update Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
rubygems-update
|
RubyGems |
< 1.8.23
|
1.8.23
|
References
Frequently Asked Questions
What is CVE-2012-2125?
Which Rubygems update versions are affected?
What version fixes CVE-2012-2125?
Is rubygems-update affected?
What CWE is associated with CVE-2012-2125?
How can I check RubyGems dependencies for CVE-2012-2125?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-228f-g3h7-3fj3",
"modified" : "2023-05-04T21:16:48Z",
"published" : "2022-05-17T04:54:56Z",
"aliases" : [ "CVE-2012-2125" ],
"summary" : "RubyGems HTTPS to HTTP redirect",
"details" : "RubyGems before 1.8.23 can redirect HTTPS connections to HTTP, which makes it easier for remote attackers to observe or modify a gem during installation via a man-in-the-middle attack.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "rubygems-update"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.8.23"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2012-2125"
}, {
"type" : "WEB",
"url" : "https://bugzilla.redhat.com/show_bug.cgi?id=814718"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/rubygems/rubygems"
}, {
"type" : "WEB",
"url" : "https://github.com/rubygems/rubygems/blob/1.8/History.txt"
}, {
"type" : "WEB",
"url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rubygems-update/CVE-2012-2125.yml"
}, {
"type" : "WEB",
"url" : "http://rhn.redhat.com/errata/RHSA-2013-1203.html"
}, {
"type" : "WEB",
"url" : "http://rhn.redhat.com/errata/RHSA-2013-1441.html"
}, {
"type" : "WEB",
"url" : "http://rhn.redhat.com/errata/RHSA-2013-1852.html"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2012/04/20/24"
}, {
"type" : "WEB",
"url" : "http://www.ubuntu.com/usn/USN-1582-1"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-05-04T21:16:48Z",
"nvd_published_at" : "2013-10-01T17:55:00Z"
}
}