Loading...
Skip to main content

CVE-2026-39324 — Vulnerability in rack-session — CVE Details

CRITICAL

Rack::Session::Cookie secrets: decrypt failure fallback enables secretless session forgery and Marshal deserialization

Published April 8, 2026Updated September 10, 2026Source: osv

Summary

`Rack::Session::Cookie` incorrectly handles decryption failures when configured with `secrets:`. If cookie decryption fails, the implementation falls back to a default decoder instead of rejecting the cookie. This allows an unauthenticated attacker to supply a crafted session cookie that is accepted as valid session data without knowledge of any configured secret. Because this mechanism is used to load session state, an attacker can manipulate session contents and potentially gain unauthorized access. ## Details When `secrets:` is configured, `Rack::Session::Cookie` attempts to decrypt incoming session cookies using one of the configured encryptors. If all decrypt attempts fail, the implementation does not reject the cookie. Instead, it falls back to decoding the cookie using a default coder. This fallback path processes attacker-controlled cookie data as trusted session state. The behavior is implicit and occurs even when encrypted cookies are expected. The fallback decoder is applied automatically and does not require the application to opt into a non-encrypted session format. As a result, a client can send a specially crafted cookie value that bypasses the intended integrity protections provided by `secrets:`. This issue affects both default configurations and those using alternative serializers for encrypted payloads. ## Impact Any Rack application using `Rack::Session::Cookie` with `secrets:` may be affected. > [!NOTE] > Rails applications are typically not affected — Rails uses `ActionDispatch::Session::CookieStore`, which is a separate implementation backed by `ActiveSupport::MessageEncryptor` and does not share the vulnerable code path. An unauthenticated attacker can supply a crafted session cookie that is accepted as valid session data. This can lead to authentication bypass or privilege escalation in applications that rely on session values for identity or authorization decisions. Depending on application behavior and available runtime components, processing of untrusted session data may also expose additional risks. ## Mitigation * Update to a patched version of`rack-session` that rejects cookies when decryption fails under the `secrets:` configuration. * After updating, rotate session secrets to invalidate existing session cookies, since attacker-supplied session data may have been accepted and re-issued prior to the fix.

Advisory Timeline

  • First published April 8, 2026 (187 days ago).
  • Last revised September 10, 2026 — 155 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Bundler
Update rack-session to 2.1.2 or later
gem install rack-session -v 2.1.2

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: rubygems (1).

PackageEcosystemAffectedFixed In
rack-session
rubygems
2.0.0, 2.1.0, 2.1.12.1.2

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-287
    Improper AuthenticationMITRE
  • CWE-345
    Insufficient Verification of Data AuthenticityMITRE
  • CWE-502
    Deserialization of Untrusted DataMITRE
  • CWE-565

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 8.6 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
—
Confidentiality
—
Integrity
—
Availability
—

CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N

Frequently Asked Questions

What is CVE-2026-39324?
Rack::Session::Cookie secrets: decrypt failure fallback enables secretless session forgery and Marshal deserialization This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 8.6/10).
How do I check if my project is affected by CVE-2026-39324?
CVE-2026-39324 affects rack-session. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-39324 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
8.6

High exploitability or significant impact. Prioritize remediation within days.

Also Known As

GHSA-33qg-7wpp-89cq

Related CVEs

  • CVE-2026-55107
    CRITICAL

    kobako Sandbox Escape: guest eval reaches host RCE via method_missing → public_send (any bound Service)

  • CVE-2026-77602
    CRITICAL

    OpenC3 COSMOS: Authenticated remote code execution via the user-writable config overlay (table definitions, cmd/tlm definitions, and script suites)

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies