CVE-2026-39324
Rack::Session::Cookie secrets: decrypt failure fallback enables secretless session forgery and Marshal deserialization
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
9.3
Rack::Session::Cookie secrets: decrypt failure fallback enables secretless session forgery and Marshal deserialization
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.
- Record
CVE-2026-39324- CVSS 4.0
- 9.3 Critical
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 - Weakness
- CWE-287, CWE-345, CWE-502, CWE-565
- Updated
- 2026-11-02
EUVDEUVD-2026-19820
9.3
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.
- Record
EUVD-2026-19820- CVSS 4.0
- 9.3 Critical
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 - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-33qg-7wpp-89cq
9.1
Rack::Session::Cookie secrets: decrypt failure fallback enables secretless session forgery and Marshal deserialization
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 byActiveSupport::MessageEncryptorand 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-sessionthat rejects cookies when decryption fails under thesecrets: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.
- Record
GHSA-33qg-7wpp-89cq- CVSS 4.0
- 9.1 Critical
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 - Weakness
- CWE-287, CWE-345, CWE-502, CWE-565
- Updated
- 2026-11-02
NVD
9.3
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.
- Record
CVE-2026-39324- CVSS 4.0
- 9.3 Critical
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-287, CWE-345, CWE-502, CWE-565
- Updated
- 2026-11-02
OSV
9.3
Rack::Session::Cookie secrets: decrypt failure fallback enables secretless session forgery and Marshal deserialization
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.
- Record
CVE-2026-39324- CVSS 4.0
- 9.3 Critical
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 - Weakness
- CWE-287, CWE-345, CWE-502, CWE-565
- Updated
- 2026-11-02
OSVDEBIAN-CVE-2026-39324
9.8
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.
- Record
DEBIAN-CVE-2026-39324- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
Show 5 moreShow less
OSVGHSA-33qg-7wpp-89cq
9.1
Rack::Session::Cookie secrets: decrypt failure fallback enables secretless session forgery and Marshal deserialization
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 byActiveSupport::MessageEncryptorand 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-sessionthat rejects cookies when decryption fails under thesecrets: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.
- Record
GHSA-33qg-7wpp-89cq- CVSS 4.0
- 9.1 Critical
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 - Weakness
- CWE-287, CWE-345, CWE-502, CWE-565
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2026-39324
9.3
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.
- Record
UBUNTU-CVE-2026-39324- CVSS 4.0
- 9.3 Critical
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 - CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVopenSUSE-SU-2026:10604-1 No score
ruby4.0-rubygem-rack-session-2.1.2-1.1 on GA media
These are all security issues fixed in the ruby4.0-rubygem-rack-session-2.1.2-1.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2026:10604-1- Updated
- 2026-11-02
OSVUSN-8190-1 No score
ruby-rack-session vulnerability
SeungMyung Lee discovered that Rack::Session did not properly reject cookies upon decryption failure. A remote attacker could use this issue to manipulate session contents and possibly gain unauthorized access.
- Record
USN-8190-1- Updated
- 2026-11-02
OSVUSN-8190-2 No score
ruby-rack-session vulnerability
USN-8190-1 fixed a vulnerability in Rack::Session. This update provides the corresponding update for Ubuntu 26.04 LTS.
Original advisory details:
SeungMyung Lee discovered that Rack::Session did not properly reject cookies upon decryption failure. A remote attacker could use this issue to manipulate session contents and possibly gain unauthorized access.
- Record
USN-8190-2- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
rack-sessionRubyGems |
2.0.0 up to 2.1.2 | 2.1.2 |
ruby-rack-sessionDebian:13 |
before 2.1.1-0.1+deb13u1, plus listed versions 2.1.1-0.1 |
2.1.1-0.1+deb13u1 |
ruby-rack-sessionDebian:14 |
before 2.1.1-0.2, plus listed versions 2.1.1-0.1 |
2.1.1-0.2 |
rack-sessionRubyGems |
2.0.0 up to 2.1.2, plus listed versions 2.1.02.1.1 |
2.1.2 |
ruby-rack-sessionUbuntu:25.10 |
before 2.1.1-0.1ubuntu0.1, plus listed versions 2.1.1-0.1 |
2.1.1-0.1ubuntu0.1 |
ruby-rack-sessionUbuntu:26.04:LTS |
before 2.1.1-0.1ubuntu0.26.04.1, plus listed versions 2.1.1-0.12.1.1-0.1build1 |
2.1.1-0.1ubuntu0.26.04.1 |
rubygem-rack-sessionopenSUSE:Tumbleweed |
before 2.1.2-1.1 | 2.1.2-1.1 |
Public exploits
Links only. Every CVE stores no exploit code.
| Source | Link | Date |
|---|---|---|
| PoC in GitHub | sm1ee/CVE-2026-39324 | 2026-04-07 |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV, PoC in GitHub |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-39324 is a critical vulnerability (CVSS 9.3) in Rack Rack-session, published April 7, 2026. Public exploit code exists. EPSS puts the chance of exploitation in the next 30 days at 0.27%, the 19th percentile. Fixed in rack-session 2.1.2.
References
github.com/rack/rack-session/security/advisories/GHSA-33qg-7wpp-89cq
nvd.nist.gov/vuln/detail/CVE-2026-39324
github.com/rubysec/ruby-advisory-db/blob/master/gems/rack-session/CVE-2026-39324.yml
github.com/advisories/GHSA-33qg-7wpp-89cq
github.com/CVEProject/cvelistV5/tree/main/cves/2026/39xxx/CVE-2026-39324.json
security-tracker.debian.org/tracker/CVE-2026-39324