CVE-2025-46336
Rack session gets restored after deletion
Rack::Session is a session management implementation for Rack. In versions starting from 2.0.0 to before 2.1.1, when using the Rack::Session::Pool middleware, and provided the attacker can acquire a session cookie (already a major issue), the session may be restored if the attacker can trigger a long running request (within that same session) adjacent to the user logging out, in order to retain illicit access even after a user has attempted to logout. This issue has been patched in version 2.1.1.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- High
- Privileges needed
- Low
- User interaction
- None
What an attacker can affect
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
4.2
Rack session gets restored after deletion
Rack::Session is a session management implementation for Rack. In versions starting from 2.0.0 to before 2.1.1, when using the Rack::Session::Pool middleware, and provided the attacker can acquire a session cookie (already a major issue), the session may be restored if the attacker can trigger a long running request (within that same session) adjacent to the user logging out, in order to retain illicit access even after a user has attempted to logout. This issue has been patched in version 2.1.1.
- Record
CVE-2025-46336- CVSS 3.1
- 4.2 Medium
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N - Weakness
- CWE-362, CWE-367, CWE-613
- Updated
- 2026-11-02
EUVDEUVD-2025-14006
4.2
Rack::Session is a session management implementation for Rack. In versions starting from 2.0.0 to before 2.1.1, when using the Rack::Session::Pool middleware, and provided the attacker can acquire a session cookie (already a major issue), the session may be restored if the attacker can trigger a long running request (within that same session) adjacent to the user logging out, in order to retain illicit access even after a user has attempted to logout. This issue has been patched in version 2.1.1.
- Record
EUVD-2025-14006- CVSS 3.1
- 4.2 Medium
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-9j94-67jr-4cqj
4.2
Rack session gets restored after deletion
Summary
When using the Rack::Session::Pool middleware, simultaneous rack requests can restore a deleted rack session, which allows the unauthenticated user to occupy that session.
Details
Rack session middleware prepares the session at the beginning of request, then saves is back to the store with possible changes applied by host rack application. This way the session becomes to be a subject of race conditions in general sense over concurrent rack requests.
Impact
When using the Rack::Session::Pool middleware, and provided the attacker can acquire a session cookie (already a major issue), the session may be restored if the attacker can trigger a long running request (within that same session) adjacent to the user logging out, in order to retain illicit access even after a user has attempted to logout.
Mitigation
- Update to the latest version of
rack-session, or - Ensure your application invalidates sessions atomically by marking them as logged out e.g., using a
logged_outflag, instead of deleting them, and check this flag on every request to prevent reuse, or - Implement a custom session store that tracks session invalidation timestamps and refuses to accept session data if the session was invalidated after the request began.
Related
This code was previously part of rack in Rack < 3, see https://github.com/rack/rack/security/advisories/GHSA-vpfw-47h7-xj4g for the equivalent advisory in rack (affecting Rack < 3 only).
- Record
GHSA-9j94-67jr-4cqj- CVSS 3.1
- 4.2 Medium
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N - Weakness
- CWE-362, CWE-367, CWE-613
- Updated
- 2026-11-02
NVD
4.2
Rack::Session is a session management implementation for Rack. In versions starting from 2.0.0 to before 2.1.1, when using the Rack::Session::Pool middleware, and provided the attacker can acquire a session cookie (already a major issue), the session may be restored if the attacker can trigger a long running request (within that same session) adjacent to the user logging out, in order to retain illicit access even after a user has attempted to logout. This issue has been patched in version 2.1.1.
- Record
CVE-2025-46336- CVSS 3.1
- 4.2 Medium
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N - Weakness
- CWE-362, CWE-367, CWE-613
- Updated
- 2026-11-02
OSV
4.2
Rack session gets restored after deletion
Rack::Session is a session management implementation for Rack. In versions starting from 2.0.0 to before 2.1.1, when using the Rack::Session::Pool middleware, and provided the attacker can acquire a session cookie (already a major issue), the session may be restored if the attacker can trigger a long running request (within that same session) adjacent to the user logging out, in order to retain illicit access even after a user has attempted to logout. This issue has been patched in version 2.1.1.
- Record
CVE-2025-46336- CVSS 3.1
- 4.2 Medium
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N - Weakness
- CWE-362, CWE-367, CWE-613
- Updated
- 2026-11-02
OSVDEBIAN-CVE-2025-46336
4.2
Rack::Session is a session management implementation for Rack. In versions starting from 2.0.0 to before 2.1.1, when using the Rack::Session::Pool middleware, and provided the attacker can acquire a session cookie (already a major issue), the session may be restored if the attacker can trigger a long running request (within that same session) adjacent to the user logging out, in order to retain illicit access even after a user has attempted to logout. This issue has been patched in version 2.1.1.
- Record
DEBIAN-CVE-2025-46336- CVSS 3.1
- 4.2 Medium
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N - Updated
- 2026-11-02
Show 4 moreShow less
OSVGHSA-9j94-67jr-4cqj
4.2
Rack session gets restored after deletion
Summary
When using the Rack::Session::Pool middleware, simultaneous rack requests can restore a deleted rack session, which allows the unauthenticated user to occupy that session.
Details
Rack session middleware prepares the session at the beginning of request, then saves is back to the store with possible changes applied by host rack application. This way the session becomes to be a subject of race conditions in general sense over concurrent rack requests.
Impact
When using the Rack::Session::Pool middleware, and provided the attacker can acquire a session cookie (already a major issue), the session may be restored if the attacker can trigger a long running request (within that same session) adjacent to the user logging out, in order to retain illicit access even after a user has attempted to logout.
Mitigation
- Update to the latest version of
rack-session, or - Ensure your application invalidates sessions atomically by marking them as logged out e.g., using a
logged_outflag, instead of deleting them, and check this flag on every request to prevent reuse, or - Implement a custom session store that tracks session invalidation timestamps and refuses to accept session data if the session was invalidated after the request began.
Related
This code was previously part of rack in Rack < 3, see https://github.com/rack/rack/security/advisories/GHSA-vpfw-47h7-xj4g for the equivalent advisory in rack (affecting Rack < 3 only).
- Record
GHSA-9j94-67jr-4cqj- CVSS 3.1
- 4.2 Medium
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N - Weakness
- CWE-362, CWE-367, CWE-613
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2025-46336
4.2
Rack::Session is a session management implementation for Rack. In versions starting from 2.0.0 to before 2.1.1, when using the Rack::Session::Pool middleware, and provided the attacker can acquire a session cookie (already a major issue), the session may be restored if the attacker can trigger a long running request (within that same session) adjacent to the user logging out, in order to retain illicit access even after a user has attempted to logout. This issue has been patched in version 2.1.1.
- Record
UBUNTU-CVE-2025-46336- CVSS 3.1
- 4.2 Medium
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N - Updated
- 2026-11-02
OSVopenSUSE-SU-2025:15623-1 No score
ruby3.4-rubygem-rack-session-2.1.1-1.1 on GA media
These are all security issues fixed in the ruby3.4-rubygem-rack-session-2.1.1-1.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2025:15623-1- Updated
- 2026-11-02
OSVopenSUSE-SU-2026:10359-1 No score
ruby4.0-rubygem-rack-session-2.1.1-1.3 on GA media
These are all security issues fixed in the ruby4.0-rubygem-rack-session-2.1.1-1.3 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2026:10359-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
rack-sessionRubyGems |
2.0.0 up to 2.1.1 | 2.1.1 |
ruby-rack-sessionDebian:13 |
before 2.1.1-0.1 | 2.1.1-0.1 |
ruby-rack-sessionDebian:14 |
before 2.1.1-0.1 | 2.1.1-0.1 |
rack-sessionRubyGems |
2.0.0 up to 2.1.1, plus listed versions 2.1.0 |
2.1.1 |
ruby-rackUbuntu:Pro:14.04:LTS |
All versions, plus listed versions 1.5.2-11.5.2-1ubuntu0.1~esm11.5.2-3+deb8u3ubuntu1~esm21.5.2-3+deb8u3ubuntu1~esm31.5.2-3+deb8u3ubuntu1~esm4 Show 5 moreShow less1.5.2-3+deb8u3ubuntu1~esm61.5.2-3+deb8u3ubuntu1~esm71.5.2-3+deb8u3ubuntu1~esm81.5.2-3+deb8u3ubuntu1~esm91.5.2-3+deb8u3ubuntu1~esm10 |
None known |
ruby-rackUbuntu:Pro:16.04:LTS |
All versions, plus listed versions 1.5.2-41.6.4-21.6.4-31.6.4-3ubuntu0.11.6.4-3ubuntu0.2 Show 7 moreShow less1.6.4-3ubuntu0.2+esm11.6.4-3ubuntu0.2+esm21.6.4-3ubuntu0.2+esm41.6.4-3ubuntu0.2+esm51.6.4-3ubuntu0.2+esm61.6.4-3ubuntu0.2+esm71.6.4-3ubuntu0.2+esm8 |
None known |
ruby-rackUbuntu:Pro:18.04:LTS |
All versions, plus listed versions 1.6.4-41.6.4-4ubuntu0.11.6.4-4ubuntu0.21.6.4-4ubuntu0.2+esm11.6.4-4ubuntu0.2+esm2 Show 5 moreShow less1.6.4-4ubuntu0.2+esm41.6.4-4ubuntu0.2+esm51.6.4-4ubuntu0.2+esm61.6.4-4ubuntu0.2+esm71.6.4-4ubuntu0.2+esm8 |
None known |
ruby-rackUbuntu:Pro:20.04:LTS |
All versions, plus listed versions 2.0.6-32.0.7-22.0.7-2ubuntu0.12.0.7-2ubuntu0.1+esm12.0.7-2ubuntu0.1+esm2 Show 5 moreShow less2.0.7-2ubuntu0.1+esm32.0.7-2ubuntu0.1+esm42.0.7-2ubuntu0.1+esm52.0.7-2ubuntu0.1+esm62.0.7-2ubuntu0.1+esm7 |
None known |
ruby-rackUbuntu:22.04:LTS |
All versions, plus listed versions 2.1.4-32.1.4-42.1.4-52.1.4-5ubuntu12.1.4-5ubuntu1.1 |
None known |
ruby-rackUbuntu:24.04:LTS |
All versions, plus listed versions 2.2.4-32.2.7-12.2.7-1ubuntu0.12.2.7-1ubuntu0.22.2.7-1ubuntu0.3 |
None known |
ruby-rackUbuntu:25.04 |
All versions, plus listed versions 2.2.7-1.12.2.7-1.1ubuntu0.25.04.1 |
None known |
rubygem-rack-sessionopenSUSE:Tumbleweed |
before 2.1.1-1.1 | 2.1.1-1.1 |
rubygem-rack-sessionopenSUSE:Tumbleweed |
before 2.1.1-1.3 | 2.1.1-1.3 |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2025-46336 is a medium vulnerability (CVSS 4.2) in Rack Rack-session, published May 8, 2025. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.39%, the 33rd percentile. Fixed in rack-session 2.1.1.
References
github.com/rack/rack-session/security/advisories/GHSA-9j94-67jr-4cqj
github.com/rack/rack/security/advisories/GHSA-vpfw-47h7-xj4g
github.com/rack/rack-session/commit/c28c4a8c1861d814e09f2ae48264ac4c40be2d3b
nvd.nist.gov/vuln/detail/CVE-2025-46336
github.com/rubysec/ruby-advisory-db/blob/master/gems/rack-session/CVE-2025-46336.yml
github.com/advisories/GHSA-9j94-67jr-4cqj