CVE-2007-6077: Rails Session Fixation Protection Mechanism Vulnerability

MODERATE
Advisory Identifier: GHSA-p4c6-77gc-694x
CWE-362
Published
Advisory Summary

CVE-2007-6077 is a MODERATE session fixation protection mechanism vulnerability (CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')) affecting Rails libraries in the RubyGems ecosystem. The issue involves session fixation protection mechanism in cgi_process.rb in rails. Remediation is available by upgrading affected packages to version 1.2.6.

CVE-2007-6077 at a Glance

CVE Identifier CVE-2007-6077
GHSA Identifier GHSA-p4c6-77gc-694x
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
Affected Product Rails
Package Ecosystem RubyGems
Published Date
Last Updated

How to Fix CVE-2007-6077

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

rails fixed: 1.2.6
Upgrade rails to 1.2.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 rails

How to Check if You Are Affected

To determine whether your application is affected by CVE-2007-6077, inspect your project dependencies for Rails:

inspect dependencies for rails

Analyze the terminal output to locate any version of Rails in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.2.6), 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-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition'), where the product contains a concurrent code sequence that requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence operating concurrently. In Rails, 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 fixation protection mechanism in cgi_process.rb in Rails 1.2.4, as used in Ruby on Rails, removes the :cookie_only attribute from the DEFAULT_SESSION_OPTIONS constant, which effectively causes cookie_only to be applied only to the first instantiation of CgiRequest, which allows remote attackers to conduct session fixation attacks. NOTE: this is due to an incomplete fix for CVE-2007-5380.

CVE-2007-6077 Affected Rails Versions

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

References

Frequently Asked Questions

What is CVE-2007-6077?
CVE-2007-6077 is a security vulnerability in Rails involving session fixation protection mechanism in cgi_process.rb in Rails under CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition').
Which Rails versions are affected?
Affected versions include releases prior to 1.2.6 across affected packages: rails.
What version fixes CVE-2007-6077?
Upgrading to 1.2.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is rails affected?
Yes, rails is affected in releases prior to 1.2.6. Upgrade your dependency to 1.2.6 or later.
What CWE is associated with CVE-2007-6077?
CVE-2007-6077 is classified under CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition') (The product contains a concurrent code sequence that requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence operating concurrently.).
How can I check RubyGems dependencies for CVE-2007-6077?
Run the dependency tree command: 'inspect dependencies for rails'. 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-p4c6-77gc-694x",
  "modified" : "2025-04-09T15:21:26Z",
  "published" : "2017-10-24T18:33:38Z",
  "aliases" : [ "CVE-2007-6077" ],
  "summary" : "session fixation protection mechanism in cgi_process.rb in Rails",
  "details" : "The session fixation protection mechanism in cgi_process.rb in Rails 1.2.4, as used in Ruby on Rails, removes the :cookie_only attribute from the DEFAULT_SESSION_OPTIONS constant, which effectively causes cookie_only to be applied only to the first instantiation of CgiRequest, which allows remote attackers to conduct session fixation attacks.  NOTE: this is due to an incomplete fix for CVE-2007-5380.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "rails"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.2.6"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2007-6077"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-p4c6-77gc-694x"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rails/CVE-2007-6077.yml"
  }, {
    "type" : "WEB",
    "url" : "https://rubyonrails.org/2007/11/24/ruby-on-rails-1-2-6-security-and-maintenance-release"
  }, {
    "type" : "WEB",
    "url" : "http://dev.rubyonrails.org/changeset/8177"
  }, {
    "type" : "WEB",
    "url" : "http://dev.rubyonrails.org/ticket/10048"
  }, {
    "type" : "WEB",
    "url" : "http://docs.info.apple.com/article.html?artnum=307179"
  }, {
    "type" : "WEB",
    "url" : "http://lists.apple.com/archives/security-announce/2007/Dec/msg00002.html"
  }, {
    "type" : "WEB",
    "url" : "http://secunia.com/advisories/27781"
  }, {
    "type" : "WEB",
    "url" : "http://secunia.com/advisories/28136"
  }, {
    "type" : "WEB",
    "url" : "http://weblog.rubyonrails.org/2007/11/24/ruby-on-rails-1-2-6-security-and-maintenance-release"
  }, {
    "type" : "WEB",
    "url" : "http://www.securityfocus.com/bid/26598"
  }, {
    "type" : "WEB",
    "url" : "http://www.us-cert.gov/cas/techalerts/TA07-352A.html"
  }, {
    "type" : "WEB",
    "url" : "http://www.vupen.com/english/advisories/2007/4009"
  }, {
    "type" : "WEB",
    "url" : "http://www.vupen.com/english/advisories/2007/4238"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-362" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T21:47:57Z",
    "nvd_published_at" : "2007-11-21T21:46:00Z"
  }
}