# CVE-2026-39324: Rack::Session::Cookie secrets: decrypt failure fallback enables secretless session forgery and Marshal deserialization

> An attacker can forge session cookies and trigger Marshal deserialization when decryption fails, potentially leading to unauthorized access or code execution.

- **Severity:** Critical 9.3 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 7 Apr 2026
- **Updated:** 8 Apr 2026
- **Also known as:** DEBIAN-CVE-2026-39324, GHSA-33qg-7wpp-89cq, MINI-228g-vvxx-pvc7, MINI-3qv2-53p5-8qw2, MINI-c3m8-ww2g-gmw2, MINI-fhjv-c56g-899f, MINI-g97c-c5pf-6rx4, MINI-hxrg-p97j-fmq6, MINI-m23q-9wc7-9v7x, MINI-m38r-4wpm-36pv, MINI-mjv4-fc92-4mgg, MINI-wv3h-9ccr-qr7f, UBUNTU-CVE-2026-39324, USN-8190-1, USN-8190-2, openSUSE-SU-2026:10604-1

## What is CVE-2026-39324?

CVE-2026-39324 is a critical unsafe deserialization vulnerability in rack-session, published on 7 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official 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.

Weakness: CWE-565 (Reliance on Cookies without Validation and Integrity Checking), CWE-502 (Deserialization of Untrusted Data), CWE-345 (Insufficient Verification of Data Authenticity), CWE-287 (Improper Authentication)

## Which versions are affected by CVE-2026-39324?

2 open source packages ship an affected version, including rack-session. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `rack-session` | RubyGems | From 2.0.0 | 2.1.2 |
| `rack-session` | RubyGems | From 2.0.0 | 2.1.2 |
| `rubygem-rack-session` | openSUSE:Tumbleweed | All versions | 2.1.2-1.1 |

Products: Rack Rack-Session.

## How do I fix CVE-2026-39324?

Upgrade rack-session to 2.1.2 or later.

## Is CVE-2026-39324 being exploited?

There is no known exploitation of CVE-2026-39324 in the wild and no public exploit code.

Public exploit code:

- CVE-2026-39324: Rack Session auth bypass PoC (github_poc): https://github.com/sm1ee/CVE-2026-39324

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-39324 and fix it if it is affected.

What it is: CVE-2026-39324 is a critical unsafe deserialization vulnerability in rack-session, published on 7 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-39324 in the wild and no public exploit code.

Affected packages and fixed versions:
- rack-session (RubyGems): affected from 2.0.0; fixed in 2.1.2
- rack-session (RubyGems): affected from 2.0.0; fixed in 2.1.2

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-39324/ (Markdown: https://insights.sbomify.com/CVE-2026-39324/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-39324
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-39324
- OSV: https://osv.dev/vulnerability/CVE-2026-39324

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-39324/
Summaries are generated and may contain mistakes; the official description above is the record.
