CVE-2013-0263: Rack Rack Arbitrary Code Execution Vulnerability

MODERATE
Advisory Identifier: GHSA-xc85-32mf-xpv8
Published
Advisory Summary

CVE-2013-0263 is a MODERATE rack arbitrary code execution vulnerability (General Security Weakness) affecting Rack libraries in the RubyGems ecosystem. The issue involves rack arbitrary code execution via timing attack. Remediation is available by upgrading affected packages to version 1.5.2, 1.4.5, 1.3.10, 1.2.8, 1.1.6.

CVE-2013-0263 at a Glance

CVE Identifier CVE-2013-0263
GHSA Identifier GHSA-xc85-32mf-xpv8
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification General Security Weakness
Affected Product Rack
Package Ecosystem RubyGems
Published Date
Last Updated

How to Fix CVE-2013-0263

To remediate this vulnerability, upgrade all affected Rack dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

rack fixed: 1.5.2
Upgrade rack to 1.5.2
rack fixed: 1.4.5
Upgrade rack to 1.4.5
rack fixed: 1.3.10
Upgrade rack to 1.3.10
rack fixed: 1.2.8
Upgrade rack to 1.2.8
rack fixed: 1.1.6
Upgrade rack to 1.1.6
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 rack

How to Check if You Are Affected

To determine whether your application is affected by CVE-2013-0263, inspect your project dependencies for Rack:

inspect dependencies for rack

Analyze the terminal output to locate any version of Rack in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.5.2), 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 Rack, 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

Rack::Session::Cookie in Rack 1.5.x before 1.5.2, 1.4.x before 1.4.5, 1.3.x before 1.3.10, 1.2.x before 1.2.8, and 1.1.x before 1.1.6 allows remote attackers to guess the session cookie, gain privileges, and execute arbitrary code via a timing attack involving an HMAC comparison function that does not run in constant time.

CVE-2013-0263 Affected Rack Versions

5 component(s)
Fixed Versions:
1.5.21.4.51.3.101.2.81.1.6
Product / Package Ecosystem Affected Versions Fixed Version
rack
RubyGems
≥ 1.5.0
< 1.5.2
1.5.2
rack
RubyGems
≥ 1.4.0
< 1.4.5
1.4.5
rack
RubyGems
≥ 1.3.0
< 1.3.10
1.3.10
rack
RubyGems
≥ 1.2.0
< 1.2.8
1.2.8
rack
RubyGems
≥ 1.1.0
< 1.1.6
1.1.6

References

Frequently Asked Questions

What is CVE-2013-0263?
CVE-2013-0263 is a security vulnerability in Rack involving Rack arbitrary code execution via timing attack under General Security Weakness.
Which Rack versions are affected?
Affected versions include releases prior to 1.5.2, 1.4.5, 1.3.10, 1.2.8, 1.1.6 across affected packages: rack.
What version fixes CVE-2013-0263?
Upgrading to 1.5.2, 1.4.5, 1.3.10, 1.2.8, 1.1.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is rack affected?
Yes, rack is affected in releases prior to 1.5.2, 1.4.5, 1.3.10, 1.2.8, 1.1.6. Upgrade your dependency to 1.5.2, 1.4.5, 1.3.10, 1.2.8, 1.1.6 or later.
What CWE is associated with CVE-2013-0263?
CVE-2013-0263 is classified under General Security Weakness.
How can I check RubyGems dependencies for CVE-2013-0263?
Run the dependency tree command: 'inspect dependencies for rack'. 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-xc85-32mf-xpv8",
  "modified" : "2022-06-17T21:30:05Z",
  "published" : "2022-05-05T02:48:42Z",
  "aliases" : [ "CVE-2013-0263" ],
  "summary" : "Rack arbitrary code execution via timing attack",
  "details" : "Rack::Session::Cookie in Rack 1.5.x before 1.5.2, 1.4.x before 1.4.5, 1.3.x before 1.3.10, 1.2.x before 1.2.8, and 1.1.x before 1.1.6 allows remote attackers to guess the session cookie, gain privileges, and execute arbitrary code via a timing attack involving an HMAC comparison function that does not run in constant time.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "rack"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.5.0"
      }, {
        "fixed" : "1.5.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "rack"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.4.0"
      }, {
        "fixed" : "1.4.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "rack"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.3.0"
      }, {
        "fixed" : "1.3.10"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "rack"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.2.0"
      }, {
        "fixed" : "1.2.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "rack"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.1.0"
      }, {
        "fixed" : "1.1.6"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2013-0263"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rack/rack/commit/0cd7e9aa397f8ebb3b8481d67dbac8b4863a7f07"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rack/rack/commit/9a81b961457805f6d1a5c275d053068440421e11"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=909071"
  }, {
    "type" : "WEB",
    "url" : "https://gist.github.com/codahale/f9f3781f7b54985bee94"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rack/rack"
  }, {
    "type" : "WEB",
    "url" : "https://groups.google.com/d/msg/rack-devel/xKrHVWeNvDM/4ZGA576CnK4J"
  }, {
    "type" : "WEB",
    "url" : "https://groups.google.com/forum/#!msg/rack-devel/RnQxm6i13C4/xfakH81yWvgJ"
  }, {
    "type" : "WEB",
    "url" : "https://groups.google.com/forum/#!msg/rack-devel/bf937jPZxJM/1s6x95vIhmAJ"
  }, {
    "type" : "WEB",
    "url" : "https://groups.google.com/forum/#!msg/rack-devel/hz-liLb9fKE/8jvVWU6xYiYJ"
  }, {
    "type" : "WEB",
    "url" : "https://groups.google.com/forum/#!msg/rack-devel/mZsuRonD7G8/DpZIOmMLbOgJ"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-updates/2013-03/msg00048.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2013-0686.html"
  }, {
    "type" : "WEB",
    "url" : "http://www.debian.org/security/2013/dsa-2783"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-06-17T21:30:05Z",
    "nvd_published_at" : "2013-02-08T20:55:00Z"
  }
}