# CVE-2026-39324: Rack rack-session auth bypass and deserialization in Session Cookie

Source: https://junglewise.ai/threats/cve-2026-39324-rack-rack-session-auth-bypass-and-deserialization-in-session  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-04-07. Updated: 2026-05-13  
License: CC BY 4.0 with a link back

CVE-2026-39324 · Severity: critical · CVSS 9.8 · Published 2026-04-07

A vulnerability in the Rack session management library allows attackers to bypass security protections on web session cookies. By sending a specially crafted cookie that fails decryption, an attacker can force the system to accept unencrypted, forged session data. This could allow an unauthorized person to hijack user accounts or escalate their privileges within an affected web application.

Vendors: [Rack](https://junglewise.ai/threats/vendors/rack), [RubyGems](https://junglewise.ai/threats/vendors/rubygems).

## Quick answers

**Is CVE-2026-39324 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-39324 being exploited in the wild.

**How severe is CVE-2026-39324?** Critical severity, with a CVSS score of 9.8, published 7 April 2026.

**Which products and versions are affected?** rack-session (RubyGems) >= 2.0.0, < 2.1.2, ECOSYSTEM:introduced=2.0.0,fixed=2.1.2.

**Is there a fix for CVE-2026-39324?** Yes. rack-session (RubyGems): upgrade to 2.1.2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-39324 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-39324?** Check whether you run Rack-Session or rack-session (RubyGems) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- rack-session (RubyGems): upgrade to 2.1.2 or later

  ```sh
  bundle update rack-session
  ```


## Technical details

The vulnerability exists in Rack::Session::Cookie when configured with the 'secrets:' option. When an incoming cookie fails decryption, the implementation incorrectly falls back to a default decoder instead of rejecting the request. An unauthenticated attacker can exploit this by providing a crafted, unencrypted cookie that the fallback mechanism processes as trusted session state. This bypasses integrity protections and can lead to session forgery, authentication bypass, or arbitrary object deserialization if the application uses vulnerable serializers like Marshal. The issue is fixed in version 2.1.2.

## Affected products

- Rack rack-session >= 2.0.0, < 2.1.2

## Identifiers

- CVE-2026-39324
- GHSA-33qg-7wpp-89cq

## Timeline

- 2026-04-07: disclosed
- 2026-04-08: advisory
- 2026-04-07: patched: Patched in version 2.1.2

## References

- [https://api.github.com/users/sm1ee](https://api.github.com/users/sm1ee)
- [https://github.com/sm1ee](https://github.com/sm1ee)
- [https://api.github.com/users/sm1ee/gists%7B/gist_id%7D](https://api.github.com/users/sm1ee/gists%7B/gist_id%7D)
- [https://api.github.com/users/sm1ee/repos](https://api.github.com/users/sm1ee/repos)
- [https://avatars.githubusercontent.com/u/19336661?v=4](https://avatars.githubusercontent.com/u/19336661?v=4)
- [https://api.github.com/users/sm1ee/events%7B/privacy%7D](https://api.github.com/users/sm1ee/events%7B/privacy%7D)

## Related threats

- [Rack session gets restored after deletion](https://junglewise.ai/threats/cve-2025-46336-rack-session-gets-restored-after-deletion)
