CVE-2013-4287: Rubygems update Denial of Service Vulnerability

MODERATE
Advisory Identifier: GHSA-9j7m-rjqx-48vh
CWE-400
Published
Advisory Summary

CVE-2013-4287 is a MODERATE denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Rubygems update libraries in the RubyGems ecosystem. The issue involves rubygems regular expression denial of service vulnerability. Remediation is available by upgrading affected packages to version 1.8.23.1, 1.8.26, 2.0.8, 2.1.0.

CVE-2013-4287 at a Glance

CVE Identifier CVE-2013-4287
GHSA Identifier GHSA-9j7m-rjqx-48vh
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Rubygems update
Package Ecosystem RubyGems
Published Date
Last Updated

How to Fix CVE-2013-4287

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.1
Upgrade rubygems-update to 1.8.23.1
rubygems-update fixed: 1.8.26
Upgrade rubygems-update to 1.8.26
rubygems-update fixed: 2.0.8
Upgrade rubygems-update to 2.0.8
rubygems-update fixed: 2.1.0
Upgrade rubygems-update to 2.1.0
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-2013-4287, 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.1), 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-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. 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

Algorithmic complexity vulnerability in Gem::Version::VERSION_PATTERN in `lib/rubygems/version.rb` in RubyGems before 1.8.23.1, 1.8.24 through 1.8.25, 2.0.x before 2.0.8, and 2.1.x before 2.1.0, as used in Ruby 1.9.0 through 2.0.0p247, allows remote attackers to cause a denial of service (CPU consumption) via a crafted gem version that triggers a large amount of backtracking in a regular expression.

CVE-2013-4287 Affected Rubygems update Versions

4 component(s)
Fixed Versions:
1.8.23.11.8.262.0.82.1.0
Product / Package Ecosystem Affected Versions Fixed Version
rubygems-update
RubyGems
< 1.8.23.1
1.8.23.1
rubygems-update
RubyGems
≥ 1.8.24
< 1.8.26
1.8.26
rubygems-update
RubyGems
≥ 2.0.0
< 2.0.8
2.0.8
rubygems-update
RubyGems
≥ 2.1.0.rc.1
< 2.1.0
2.1.0

References

NVD — CVE-2013-4287 NVD
https://nvd.nist.gov/vuln/detail/CVE-2013-4287
Security Fix Commit FIX COMMIT
https://github.com/rubygems/rubygems/commit/938a7e31ac73655845ab9045629ff3f580a125da
Security Fix Commit FIX COMMIT
https://github.com/rubygems/rubygems/commit/b697536f2455e8c8853cf5cf8a1017a36031ed67
Security Fix Commit FIX COMMIT
https://github.com/rubygems/rubygems/commit/b9baec03145aed684d1cd3c87dcac3cc06becd9b
Security Fix Commit FIX COMMIT
https://github.com/rubygems/rubygems/commit/ed733bc379d75620f5be4213f89d1d7b38be3191
Rubygems update Source Repository REPOSITORY
https://github.com/rubygems/rubygems/blob/03a074e8838683f45611b119fd8f363aa44fe2fd/CHANGELOG.md
Rubygems update Source Repository REPOSITORY
https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rubygems-update/CVE-2013-4287.yml
Rubygems update Security Information SECURITY
https://web.archive.org/web/20160806152839/https://puppet.com/security/cve/cve-2013-4287
blog.rubygems.org/2013/09/09/cve-2013... WEB
http://blog.rubygems.org/2013/09/09/CVE-2013-4287.html
rhn.redhat.com/errata/rhsa-2013-14... WEB
http://rhn.redhat.com/errata/RHSA-2013-1427.html
rhn.redhat.com/errata/rhsa-2013-14... WEB
http://rhn.redhat.com/errata/RHSA-2013-1441.html
rhn.redhat.com/errata/rhsa-2013-15... WEB
http://rhn.redhat.com/errata/RHSA-2013-1523.html
rhn.redhat.com/errata/rhsa-2013-18... WEB
http://rhn.redhat.com/errata/RHSA-2013-1852.html
rhn.redhat.com/errata/rhsa-2014-02... WEB
http://rhn.redhat.com/errata/RHSA-2014-0207.html
Rubygems update Security Information SECURITY
http://www.openwall.com/lists/oss-security/2013/09/10/1

Frequently Asked Questions

What is CVE-2013-4287?
CVE-2013-4287 is a security vulnerability in Rubygems update involving RubyGems Regular Expression Denial of Service vulnerability under CWE-400: Uncontrolled Resource Consumption.
Which Rubygems update versions are affected?
Affected versions include releases prior to 1.8.23.1, 1.8.26, 2.0.8, 2.1.0 across affected packages: rubygems-update.
What version fixes CVE-2013-4287?
Upgrading to 1.8.23.1, 1.8.26, 2.0.8, 2.1.0 (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.1, 1.8.26, 2.0.8, 2.1.0. Upgrade your dependency to 1.8.23.1, 1.8.26, 2.0.8, 2.1.0 or later.
What CWE is associated with CVE-2013-4287?
CVE-2013-4287 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check RubyGems dependencies for CVE-2013-4287?
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-9j7m-rjqx-48vh",
  "modified" : "2023-03-08T19:16:03Z",
  "published" : "2022-05-14T01:08:27Z",
  "aliases" : [ "CVE-2013-4287" ],
  "summary" : "RubyGems Regular Expression Denial of Service vulnerability",
  "details" : "Algorithmic complexity vulnerability in Gem::Version::VERSION_PATTERN in `lib/rubygems/version.rb` in RubyGems before 1.8.23.1, 1.8.24 through 1.8.25, 2.0.x before 2.0.8, and 2.1.x before 2.1.0, as used in Ruby 1.9.0 through 2.0.0p247, allows remote attackers to cause a denial of service (CPU consumption) via a crafted gem version that triggers a large amount of backtracking in a regular expression.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "rubygems-update"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.8.23.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "rubygems-update"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.8.24"
      }, {
        "fixed" : "1.8.26"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "rubygems-update"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0"
      }, {
        "fixed" : "2.0.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "rubygems-update"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.1.0.rc.1"
      }, {
        "fixed" : "2.1.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2013-4287"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubygems/rubygems/commit/938a7e31ac73655845ab9045629ff3f580a125da"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubygems/rubygems/commit/b697536f2455e8c8853cf5cf8a1017a36031ed67"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubygems/rubygems/commit/b9baec03145aed684d1cd3c87dcac3cc06becd9b"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubygems/rubygems/commit/ed733bc379d75620f5be4213f89d1d7b38be3191"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubygems/rubygems/blob/03a074e8838683f45611b119fd8f363aa44fe2fd/CHANGELOG.md"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rubygems-update/CVE-2013-4287.yml"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20160806152839/https://puppet.com/security/cve/cve-2013-4287"
  }, {
    "type" : "WEB",
    "url" : "http://blog.rubygems.org/2013/09/09/CVE-2013-4287.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2013-1427.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2013-1441.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2013-1523.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2013-1852.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2014-0207.html"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2013/09/10/1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-03-08T19:16:03Z",
    "nvd_published_at" : "2013-10-17T23:55:00Z"
  }
}