CVE-2012-2125: Rubygems update RubyGems HTTPS To HTTP Redirect Vulnerability

MODERATE
Advisory Identifier: GHSA-228f-g3h7-3fj3
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2012-2125
GHSA Identifier GHSA-228f-g3h7-3fj3
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification General Security Weakness
Affected Product Rubygems update
Package Ecosystem RubyGems
Published Date
Last Updated

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.

rubygems-update fixed: 1.8.23
Upgrade rubygems-update to 1.8.23
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-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

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.

CVE-2012-2125 Affected Rubygems update Versions

1 component(s)
Fixed Versions:
1.8.23
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?
CVE-2012-2125 is a security vulnerability in Rubygems update involving RubyGems HTTPS to HTTP redirect under General Security Weakness.
Which Rubygems update versions are affected?
Affected versions include releases prior to 1.8.23 across affected packages: rubygems-update.
What version fixes CVE-2012-2125?
Upgrading to 1.8.23 (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 1.8.23. Upgrade your dependency to 1.8.23 or later.
What CWE is associated with CVE-2012-2125?
CVE-2012-2125 is classified under General Security Weakness.
How can I check RubyGems dependencies for CVE-2012-2125?
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-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"
  }
}