CVE-2025-46336

4.2 MEDIUM

📋 TL;DR

This vulnerability in Rack::Session allows session fixation attacks when using the Pool middleware. An attacker who obtains a session cookie can maintain access even after a user logs out by exploiting concurrent long-running requests. This affects applications using Rack::Session versions 2.0.0 through 2.1.0.

💻 Affected Systems

Products:
  • Rack::Session
Versions: 2.0.0 to 2.1.0
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects applications using Rack::Session::Pool middleware. Other session stores are not vulnerable.

⚠️ Manual Verification Required

This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.

Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).

🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. Consider updating to the latest version as a precaution

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers maintain persistent unauthorized access to user accounts after logout, potentially accessing sensitive data or performing actions as the user.

🟠

Likely Case

Limited session hijacking where attackers retain access for short periods after logout, primarily affecting applications with concurrent request handling.

🟢

If Mitigated

Minimal impact with proper session management controls, as attackers still need initial session cookie compromise.

🌐 Internet-Facing: MEDIUM - Requires session cookie compromise first, but affects web applications directly exposed to users.
🏢 Internal Only: LOW - Internal applications typically have additional authentication layers and reduced attack surface.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Requires session cookie compromise plus ability to trigger concurrent long-running requests. Timing-dependent attack.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2.1.1

Vendor Advisory: https://github.com/rack/rack-session/security/advisories/GHSA-9j94-67jr-4cqj

Restart Required: Yes

Instructions:

1. Update Rack::Session gem to version 2.1.1 or later. 2. Run 'bundle update rack-session' if using Bundler. 3. Restart application server. 4. Verify update with 'bundle show rack-session' or gem list.

🔧 Temporary Workarounds

Switch to alternative session store

all

Use a different session middleware like CookieStore or MemcacheStore instead of Pool

# In config/application.rb or similar:
# config.middleware.use Rack::Session::CookieStore, key: '_your_app_session'

Implement session timeout

all

Add automatic session expiration to limit window for exploitation

# In session configuration:
# Rack::Session::Pool.new(app, expire_after: 1800) # 30 minutes

🧯 If You Can't Patch

  • Implement additional session validation checks in application code
  • Monitor for unusual concurrent session activity patterns

🔍 How to Verify

Check if Vulnerable:

Check Gemfile.lock or run 'bundle show rack-session' to see if version is between 2.0.0 and 2.1.0 inclusive

Check Version:

bundle show rack-session || gem list rack-session

Verify Fix Applied:

Confirm rack-session version is 2.1.1 or higher using 'bundle show rack-session' or 'gem list rack-session'

📡 Detection & Monitoring

Log Indicators:

  • Multiple concurrent long-running requests from same session ID
  • Session reuse after logout events

Network Indicators:

  • Unusually long HTTP requests to session endpoints

SIEM Query:

session_id:* AND (duration_ms:>30000) AND (event_type:logout OR status:401)

🔗 References

📤 Share & Export