CVE-2008-7311: Spree Spree Uses A Hardcoded Hash Vulnerability

MODERATE
Advisory Identifier: GHSA-g466-57gh-cqfw
Published
Advisory Summary

CVE-2008-7311 is a MODERATE spree uses a hardcoded hash vulnerability (General Security Weakness) affecting Spree libraries in the RubyGems ecosystem. The issue involves spree uses a hardcoded hash value. Remediation is available by upgrading affected packages to version 0.4.0.

CVE-2008-7311 at a Glance

CVE Identifier CVE-2008-7311
GHSA Identifier GHSA-g466-57gh-cqfw
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification General Security Weakness
Affected Product Spree
Package Ecosystem RubyGems
Published Date
Last Updated

How to Fix CVE-2008-7311

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

spree fixed: 0.4.0
Upgrade spree to 0.4.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 spree

How to Check if You Are Affected

To determine whether your application is affected by CVE-2008-7311, inspect your project dependencies for Spree:

inspect dependencies for spree

Analyze the terminal output to locate any version of Spree in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.4.0), 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 Spree, 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 session cookie store implementation in Spree 0.2.0 uses a hardcoded `config.action_controller_session` hash value (aka secret key), which makes it easier for remote attackers to bypass cryptographic protection mechanisms by leveraging an application that contains this value within the `config/environment.rb` file.

CVE-2008-7311 Affected Spree Versions

1 component(s)
Fixed Versions:
0.4.0
Product / Package Ecosystem Affected Versions Fixed Version
spree
RubyGems
< 0.4.0
0.4.0

References

Frequently Asked Questions

What is CVE-2008-7311?
CVE-2008-7311 is a security vulnerability in Spree involving Spree uses a hardcoded hash value under General Security Weakness.
Which Spree versions are affected?
Affected versions include releases prior to 0.4.0 across affected packages: spree.
What version fixes CVE-2008-7311?
Upgrading to 0.4.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is spree affected?
Yes, spree is affected in releases prior to 0.4.0. Upgrade your dependency to 0.4.0 or later.
What CWE is associated with CVE-2008-7311?
CVE-2008-7311 is classified under General Security Weakness.
How can I check RubyGems dependencies for CVE-2008-7311?
Run the dependency tree command: 'inspect dependencies for spree'. 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-g466-57gh-cqfw",
  "modified" : "2023-01-27T00:09:31Z",
  "published" : "2022-05-17T05:30:58Z",
  "aliases" : [ "CVE-2008-7311" ],
  "summary" : "Spree uses a hardcoded hash value",
  "details" : "The session cookie store implementation in Spree 0.2.0 uses a hardcoded `config.action_controller_session` hash value (aka secret key), which makes it easier for remote attackers to bypass cryptographic protection mechanisms by leveraging an application that contains this value within the `config/environment.rb` file.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "spree"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.4.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2008-7311"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/spree/CVE-2008-7311.yml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/spree/spree"
  }, {
    "type" : "WEB",
    "url" : "https://spreecommerce.com/blog/security-vulernability-session-cookie-store"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20090306033106/http://support.spreehq.org/issues/show/63"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20100309050152/http://rubygems.org/gems/spree/versions"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20101128024939/http://spreecommerce.com/blog/2008/08/12/security-vulernability-session-cookie-store"
  }, {
    "type" : "WEB",
    "url" : "http://spreecommerce.com/blog/2008/08/12/security-vulernability-session-cookie-store"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-01-27T00:09:31Z",
    "nvd_published_at" : "2012-04-05T13:25:00Z"
  }
}