CVE-2026-39324

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

Published Apr 7, 2026 CVSS 4.0 · 9.3 Critical EPSS < 1% KEV · Not listed
Description
Rack::Session is a session management implementation for Rack. From 2.0.0 to before 2.1.2, 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. This vulnerability is fixed in 2.1.2.

Analysis

AI-generated

Technical impact

Rack::Session::Cookie incorrectly handles decryption failures when secrets are configured. When a cookie cannot be decrypted, the library falls back to a default decoder instead of rejecting it. This flaw lets an unauthenticated attacker craft a session cookie that is accepted as valid without knowing any configured secret. The attacker can then manipulate the session payload, potentially gaining unauthorized access to the application. Because the session payload is deserialized using Marshal, this vulnerability may also allow remote code execution if the application uses unsafe deserialization. The weakness corresponds to authentication bypass and deserialization flaws.

Affected Systems

The issue affects Rack's session management component rack-session, versions from 2.0.0 up to, but not including, 2.1.2. Applications built with these Ruby libraries are vulnerable if they rely on cookie‑based sessions and have any configured secrets. The vulnerability is present in any deployment that does not upgrade past 2.1.2.

Risk and Exploitability

The CVSS base score is 9.3, indicating a critical severity. No EPSS score is reported, and the defect is not yet in CISA’s KEV catalog, but the lack of a secret requirement for exploitation makes the threat broad. An attacker only needs to send a malicious cookie to the target endpoint; no authentication or additional privileges are required. If exploited, the impact can range from unauthorized data access to possible code execution depending on how the application deserializes the session data.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade rack-session to version 2.1.2 or later
  • Verify that any configured secrets are enabled and correct
  • If immediate upgrade is not possible, validate session cookies and reject malformed or unauthorized ones
  • Review application code for unsafe Marshal deserialization; replace with safe alternatives

Generated by OpenCVE AI on April 7, 2026 at 21:54 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DSA Debian DSA DSA-6542-1 ruby-rack-session security update
Github GHSA Github GHSA GHSA-33qg-7wpp-89cq Rack::Session::Cookie secrets: decrypt failure fallback enables secretless session forgery and Marshal deserialization
Ubuntu USN Ubuntu USN USN-8190-2 Rack::Session vulnerability
Ubuntu USN Ubuntu USN USN-8190-1 Rack::Session vulnerability
History
Type Values Removed Values Added
CPEs cpe:2.3:a:rack:rack-session:*:*:*:*:*:ruby:*:*
Metrics cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Rack
Rack rack-session
Vendors & Products Rack
Rack rack-session
Type Values Removed Values Added
Description Rack::Session is a session management implementation for Rack. From 2.0.0 to before 2.1.2, 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. This vulnerability is fixed in 2.1.2.
Title Rack::Session::Cookie secrets: decrypt failure fallback enables secretless session forgery and Marshal deserialization
Weaknesses CWE-287
CWE-345
CWE-502
CWE-565
References
Metrics cvssV4_0

{'score': 9.3, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-287

    Improper Authentication

  • CWE-345

    Insufficient Verification of Data Authenticity

  • CWE-502

    Deserialization of Untrusted Data

  • CWE-565

    Reliance on Cookies without Validation and Integrity Checking

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Apr 8, 2026, 6:44 PM
Reserved
Apr 6, 2026, 7:31 PM
Status
Analyzed
Published
Apr 7, 2026, 6:16 PM
Modified
Oct 26, 2026, 9:10 PM