CVE-2012-2126: Rubygems update RubyGems Does Not Verify SSL Vulnerability

MODERATE
Advisory Identifier: GHSA-5mgj-mvv8-46mw
Published
Advisory Summary

CVE-2012-2126 is a MODERATE rubygems does not verify ssl vulnerability (General Security Weakness) affecting Rubygems update libraries in the RubyGems ecosystem. The issue involves rubygems does not verify ssl certificate. Remediation is available by upgrading affected packages to version 1.8.23.

CVE-2012-2126 at a Glance

CVE Identifier CVE-2012-2126
GHSA Identifier GHSA-5mgj-mvv8-46mw
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-2126

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-2126, 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 does not verify an SSL certificate, which allows remote attackers to modify a gem during installation via a man-in-the-middle attack.

CVE-2012-2126 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-2126?
CVE-2012-2126 is a security vulnerability in Rubygems update involving RubyGems does not verify SSL certificate 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-2126?
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-2126?
CVE-2012-2126 is classified under General Security Weakness.
How can I check RubyGems dependencies for CVE-2012-2126?
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-5mgj-mvv8-46mw",
  "modified" : "2023-05-04T21:15:08Z",
  "published" : "2022-05-17T04:54:47Z",
  "aliases" : [ "CVE-2012-2126" ],
  "summary" : "RubyGems does not verify SSL certificate",
  "details" : "RubyGems before 1.8.23 does not verify an SSL certificate, which allows remote attackers to 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-2126"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubygems/rubygems/commit/d4c7eafb8efe1e13a7abf5be5a5b4548870b15b7"
  }, {
    "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-2126.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:15:08Z",
    "nvd_published_at" : "2013-10-01T17:55:00Z"
  }
}