UBUNTU-CVE-2026-126076: Medium severity ubuntu/rails vulnerability
Action Pack is a framework for handling and responding to web requests. Prior to 8.1.4.1 and 8.0.5.2, ActionDispatch::Session::CacheStore writes a session back to the cache at the end of each request that loaded it, without checking that the session's cache entry still exists. When a concurrent request destroys the session, through resetsession on logout or by deleting its cache entry on the server, a request that loaded the session earlier and finishes later restores it under its original session ID. Logout and server-side revocation could therefore fail to end a session, and an attacker who holds a stolen session cookie could keep that session valid across the victim's logout. Applications that use config.sessionstore :cachestore are affected, with any cache backend. ActionDispatch::Session::CookieStore is not affected, nor is ActionDispatch::Session::MemCacheStore with Dalli 4.0.0 or later, whose session store does not write back a session that was deleted. This issue is fixed in versions 8.1.4.1 and 8.0.5.2.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Action Packto a version that resolves this vulnerability.Fixed in 8.1.4.1 - Upgrade
Upgrade
Action Packto a version that resolves this vulnerability.Fixed in 8.0.5.2
Event History
Frequently Asked Questions
Which Rails session configurations are affected?
Applications configured with config.session_store :cache_store are affected regardless of the cache backend. CookieStore is not affected, and MemCacheStore using Dalli 4.0.0 or later is not affected because it does not write back a deleted session.
What does an attacker need to exploit this issue?
The attacker needs a stolen session cookie for a session that is being logged out or otherwise revoked. A concurrent request that loaded the session before its deletion and completes afterward can restore the session under the original ID, allowing the stolen cookie to remain valid.
How can I determine whether my application is exposed?
Check the application's session-store configuration for config.session_store :cache_store. If it uses that store and runs a version earlier than 8.1.4.1 or 8.0.5.2, it is exposed to the described session restoration condition.
What should be done if upgrading cannot happen immediately?
Use a session store that is not affected, such as CookieStore, or use MemCacheStore with Dalli 4.0.0 or later. The permanent fix is to upgrade to Rails 8.1.4.1 or 8.0.5.2.