Vulnerabilities in pkg:gem/rack-cache

PACKAGE
Advisory Identifier: GHSA-hrp6-w4v2-8737
Advisory Summary

CVE-2012-2671 is a MODERATE rack-cache caches sensitive headers vulnerability (CWE-525: Use of Web Browser Cache Containing Sensitive Information) affecting Rack cache libraries in the RubyGems ecosystem. The issue involves rack-cache caches sensitive headers. Remediation is available by upgrading affected packages to version 1.2.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:gem/rack-cache

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:gem/rack-cache. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-hrp6-w4v2-8737 CVE-2012-2671 MODERATE Rack-Cache caches sensitive headers

CVE-2012-2671 at a Glance

CVE Identifier CVE-2012-2671
GHSA Identifier GHSA-hrp6-w4v2-8737
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-525: Use of Web Browser Cache Containing Sensitive Information
Affected Product Rack cache
Package Ecosystem RubyGems
Published Date
Last Updated

How to Fix CVE-2012-2671

To remediate this vulnerability, upgrade all affected Rack cache 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-cache fixed: 1.2
Upgrade rack-cache to 1.2
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-cache

How to Check if You Are Affected

To determine whether your application is affected by CVE-2012-2671, inspect your project dependencies for Rack cache:

inspect dependencies for rack-cache

Analyze the terminal output to locate any version of Rack cache in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.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 CWE-525: Use of Web Browser Cache Containing Sensitive Information, where the web application does not use an appropriate caching policy that specifies the extent to which each web page and associated form fields should be cached. In Rack cache, 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

The Rack::Cache rubygem 0.3.0 through 1.1 caches Set-Cookie and other sensitive headers, which allows attackers to obtain sensitive cookie information, hijack web sessions, or have other unspecified impact by accessing the cache.

CVE-2012-2671 Affected Rack cache Versions

1 component(s)
Fixed Versions:
1.2
Product / Package Ecosystem Affected Versions Fixed Version
rack-cache
RubyGems
≥ 0.3.0
< 1.2
1.2

References

Frequently Asked Questions

What is CVE-2012-2671?
CVE-2012-2671 is a security vulnerability in Rack cache involving Rack-Cache caches sensitive headers under CWE-525: Use of Web Browser Cache Containing Sensitive Information.
Which Rack cache versions are affected?
Affected versions include releases prior to 1.2 across affected packages: rack-cache.
What version fixes CVE-2012-2671?
Upgrading to 1.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is rack-cache affected?
Yes, rack-cache is affected in releases prior to 1.2. Upgrade your dependency to 1.2 or later.
What CWE is associated with CVE-2012-2671?
CVE-2012-2671 is classified under CWE-525: Use of Web Browser Cache Containing Sensitive Information (The web application does not use an appropriate caching policy that specifies the extent to which each web page and associated form fields should be cached.).
How can I check RubyGems dependencies for CVE-2012-2671?
Run the dependency tree command: 'inspect dependencies for rack-cache'. 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-hrp6-w4v2-8737",
  "modified" : "2023-03-27T16:14:33Z",
  "published" : "2022-05-17T05:05:40Z",
  "aliases" : [ "CVE-2012-2671" ],
  "summary" : "Rack-Cache caches sensitive headers",
  "details" : "The Rack::Cache rubygem 0.3.0 through 1.1 caches Set-Cookie and other sensitive headers, which allows attackers to obtain sensitive cookie information, hijack web sessions, or have other unspecified impact by accessing the cache.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "rack-cache"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.3.0"
      }, {
        "fixed" : "1.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2012-2671"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rtomayko/rack-cache/pull/52"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rtomayko/rack-cache/commit/2e3a64d07daac4c757cc57620f2288e865a09b90"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.novell.com/show_bug.cgi?id=763650"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=824520"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rtomayko/rack-cache/blob/master/CHANGES"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rack-cache/CVE-2012-2671.yml"
  }, {
    "type" : "WEB",
    "url" : "http://lists.fedoraproject.org/pipermail/package-announce/2012-June/081812.html"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2012/06/06/4"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2012/06/06/8"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-525" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-03-27T16:14:33Z",
    "nvd_published_at" : "2012-06-17T03:41:00Z"
  }
}