CVE-2026-39324: Rack::Session::Cookie Decrypt Failure Fallback Vulnerability

rack-session Updated 08 Apr 2026

Summary

08/04/2026
Yes i
Critical
9.1

CVE-2026-39324: Rack::Session::Cookie incorrectly handles decryption failures when configured with secrets:. Affects rack-session versions >= 2.0.0, < 2.1.2. Fixed in 2.1.2. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Rack::Session::Cookie is a Ruby library that provides cookie-based session management for Rack applications. It allows developers to store session data in cookies, which are sent back and forth between the client and server. The library supports encryption and signing of session data to ensure its integrity and confidentiality. However, a vulnerability exists in how it handles decryption failures when configured with secrets, potentially allowing unauthorized access to session data.

Vulnerability Detail

The vulnerability arises from the incorrect handling of decryption failures in Rack::Session::Cookie when the 'secrets' configuration is used. If cookie decryption fails, instead of rejecting the cookie, the implementation falls back to a default decoder, which processes attacker-controlled cookie data as trusted session state. This behavior can lead to session forgery, where an unauthenticated attacker can supply a crafted session cookie that is accepted as valid, potentially allowing them to manipulate session contents and gain unauthorized access to the application.

How To Fix

Minimum fixed version

2.1.2

This is the first release that contains the fix.

gem install rack-session -v 2.1.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, you can disable the use of 'secrets' in your Rack::Session::Cookie configuration, although this is not recommended as it reduces the security of session management. Instead, focus on updating to the patched version as soon as possible.

Conclusion

CVE-2026-39324 presents a significant security risk for applications using Rack::Session::Cookie with the 'secrets' configuration. It is crucial to update to the patched version to mitigate the risk of session forgery and unauthorized access. Regular monitoring for vulnerabilities using tools like Vulert can help maintain application security.

See every vulnerability recorded for rack-session →

Share this vulnerability

FAQ

CVE-2026-39324 is a vulnerability in Rack::Session::Cookie that allows session forgery due to improper handling of decryption failures.

Any Rack application using Rack::Session::Cookie with the 'secrets' configuration may be affected.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

The CVSS score of this vulnerability is 9.1, indicating a critical severity level.

If you cannot update the package right away, consider disabling the use of 'secrets' in your configuration as a temporary workaround, but be aware that this reduces security.

Related vulnerabilities

Recent vulnerabilities recorded for rack-session.

How To Fix

Minimum fixed version

2.1.2

This is the first release that contains the fix.

gem install rack-session -v 2.1.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback