{"id":"CVE-2025-46336","aliases":["DEBIAN-CVE-2025-46336","EUVD-2025-14006","GHSA-9j94-67jr-4cqj","UBUNTU-CVE-2025-46336","openSUSE-SU-2025:15623-1","openSUSE-SU-2026:10359-1"],"status":"published","title":"Rack session gets restored after deletion","description":"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.","severity":{"version":"3.1","score":4.2,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.00394,"percentile":0.33961,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-362","CWE-367","CWE-613"],"published":"2025-05-08T14:45:33Z","modified":"2026-10-28T02:31:03Z","fixes":[{"ecosystem":"RubyGems","package":"rack-session","fixed_in":["2.1.1"],"sources":["ghsa","osv"]},{"ecosystem":"Debian:13","package":"ruby-rack-session","fixed_in":["2.1.1-0.1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"ruby-rack-session","fixed_in":["2.1.1-0.1"],"sources":["osv"]},{"ecosystem":"openSUSE:Tumbleweed","package":"rubygem-rack-session","fixed_in":["2.1.1-1.1","2.1.1-1.3"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"RubyGems","package":"rack-session","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.0.0"},{"fixed":"2.1.1"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"ruby-rack-session","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.1.1-0.1"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"ruby-rack-session","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.1.1-0.1"}]}]},{"source":"osv","ecosystem":"RubyGems","package":"rack-session","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.0.0"},{"fixed":"2.1.1"}]}],"versions":["2.0.0","2.1.0"]},{"source":"osv","ecosystem":"Ubuntu:Pro:14.04:LTS","package":"ruby-rack","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.5.2-1","1.5.2-1ubuntu0.1~esm1","1.5.2-3+deb8u3ubuntu1~esm2","1.5.2-3+deb8u3ubuntu1~esm3","1.5.2-3+deb8u3ubuntu1~esm4","1.5.2-3+deb8u3ubuntu1~esm6","1.5.2-3+deb8u3ubuntu1~esm7","1.5.2-3+deb8u3ubuntu1~esm8","1.5.2-3+deb8u3ubuntu1~esm9","1.5.2-3+deb8u3ubuntu1~esm10"]},{"source":"osv","ecosystem":"Ubuntu:Pro:16.04:LTS","package":"ruby-rack","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.5.2-4","1.6.4-2","1.6.4-3","1.6.4-3ubuntu0.1","1.6.4-3ubuntu0.2","1.6.4-3ubuntu0.2+esm1","1.6.4-3ubuntu0.2+esm2","1.6.4-3ubuntu0.2+esm4","1.6.4-3ubuntu0.2+esm5","1.6.4-3ubuntu0.2+esm6","1.6.4-3ubuntu0.2+esm7","1.6.4-3ubuntu0.2+esm8"]},{"source":"osv","ecosystem":"Ubuntu:Pro:18.04:LTS","package":"ruby-rack","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.6.4-4","1.6.4-4ubuntu0.1","1.6.4-4ubuntu0.2","1.6.4-4ubuntu0.2+esm1","1.6.4-4ubuntu0.2+esm2","1.6.4-4ubuntu0.2+esm4","1.6.4-4ubuntu0.2+esm5","1.6.4-4ubuntu0.2+esm6","1.6.4-4ubuntu0.2+esm7","1.6.4-4ubuntu0.2+esm8"]},{"source":"osv","ecosystem":"Ubuntu:Pro:20.04:LTS","package":"ruby-rack","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.0.6-3","2.0.7-2","2.0.7-2ubuntu0.1","2.0.7-2ubuntu0.1+esm1","2.0.7-2ubuntu0.1+esm2","2.0.7-2ubuntu0.1+esm3","2.0.7-2ubuntu0.1+esm4","2.0.7-2ubuntu0.1+esm5","2.0.7-2ubuntu0.1+esm6","2.0.7-2ubuntu0.1+esm7"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"ruby-rack","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.1.4-3","2.1.4-4","2.1.4-5","2.1.4-5ubuntu1","2.1.4-5ubuntu1.1"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"ruby-rack","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.2.4-3","2.2.7-1","2.2.7-1ubuntu0.1","2.2.7-1ubuntu0.2","2.2.7-1ubuntu0.3"]},{"source":"osv","ecosystem":"Ubuntu:25.04","package":"ruby-rack","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.2.7-1.1","2.2.7-1.1ubuntu0.25.04.1"]},{"source":"osv","ecosystem":"openSUSE:Tumbleweed","package":"rubygem-rack-session","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.1.1-1.1"}]}]},{"source":"osv","ecosystem":"openSUSE:Tumbleweed","package":"rubygem-rack-session","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.1.1-1.3"}]}]}],"products":[{"vendor":"rack","product":"rack-session"}],"references":[{"url":"https://github.com/rack/rack-session/security/advisories/GHSA-9j94-67jr-4cqj","tags":["x_refsource_CONFIRM","advisory","web","report"]},{"url":"https://github.com/rack/rack/security/advisories/GHSA-vpfw-47h7-xj4g","tags":["x_refsource_MISC","advisory","web","report"]},{"url":"https://github.com/rack/rack-session/commit/c28c4a8c1861d814e09f2ae48264ac4c40be2d3b","tags":["x_refsource_MISC","fix","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-46336","tags":["advisory"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rack-session/CVE-2025-46336.yml","tags":["web"]},{"url":"https://github.com/advisories/GHSA-9j94-67jr-4cqj"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/46xxx/CVE-2025-46336.json","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2025-46336","tags":["advisory"]},{"url":"https://github.com/rack/rack-session","tags":["package"]},{"url":"https://ubuntu.com/security/CVE-2025-46336","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2025-46336","tags":["report"]},{"url":"","tags":["advisory"]},{"url":"https://www.suse.com/security/cve/CVE-2025-46336","tags":["web"]}],"sources":{"cve":[{"id":"CVE-2025-46336","title":"Rack session gets restored after deletion","description":"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.","status":"published","published":"2025-05-08T19:26:01.638Z","modified":"2025-05-08T20:18:38.555Z","cvss":[{"version":"3.1","score":4.2,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N","level":"medium","assessor":"cna"}],"cwes":["CWE-362","CWE-367","CWE-613"],"updated_at":"2026-11-02T14:32:36.706507Z"}],"euvd":[{"id":"EUVD-2025-14006","description":"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.","status":"published","published":"2025-05-08T19:26:01Z","modified":"2025-05-08T20:18:38Z","cvss":[{"version":"3.1","score":4.2,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N","level":"medium"}],"updated_at":"2026-11-02T20:32:51.238738Z"}],"ghsa":[{"id":"GHSA-9j94-67jr-4cqj","title":"Rack session gets restored after deletion","description":"## Summary\n\nWhen using the `Rack::Session::Pool` middleware, simultaneous rack requests can restore a deleted rack session, which allows the unauthenticated user to occupy that session.\n\n## Details\n\n[Rack session middleware](https://github.com/rack/rack-session/blob/v2.1.0/lib/rack/session/abstract/id.rb#L271-L278) 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.\n\n## Impact\n\nWhen 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.\n\n## Mitigation\n\n- Update to the latest version of `rack-session`, or\n- Ensure your application invalidates sessions atomically by marking them as logged out e.g., using a `logged_out` flag, instead of deleting them, and check this flag on every request to prevent reuse, or\n- 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.\n\n## Related\n\nThis code was previously part of `rack` in Rack \u003c 3, see \u003chttps://github.com/rack/rack/security/advisories/GHSA-vpfw-47h7-xj4g\u003e for the equivalent advisory in `rack` (affecting Rack \u003c 3 only).","status":"published","published":"2025-05-08T14:45:33Z","modified":"2025-05-09T14:34:49Z","cvss":[{"version":"3.1","score":4.2,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N","level":"medium"}],"cwes":["CWE-362","CWE-367","CWE-613"],"updated_at":"2026-11-02T14:38:43.172412Z"}],"nvd":[{"id":"CVE-2025-46336","description":"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.","status":"published","published":"2025-05-08T20:15:30.67Z","modified":"2026-06-17T09:26:15.517Z","cvss":[{"version":"3.1","score":4.2,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N","level":"medium","assessor":"secondary"}],"cwes":["CWE-362","CWE-367","CWE-613"],"updated_at":"2026-11-02T14:11:06.085152Z"}],"osv":[{"id":"CVE-2025-46336","title":"Rack session gets restored after deletion","description":"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.","status":"published","published":"2025-05-08T19:26:01.638Z","modified":"2026-10-28T02:31:03.60714305Z","cvss":[{"version":"3.1","score":4.2,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N","level":"medium"}],"cwes":["CWE-362","CWE-367","CWE-613"],"updated_at":"2026-11-02T15:44:49.707645Z"},{"id":"DEBIAN-CVE-2025-46336","description":"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.","status":"published","published":"2025-05-08T20:15:30.67Z","modified":"2026-09-01T20:05:53.179459439Z","cvss":[{"version":"3.1","score":4.2,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N","level":"medium"}],"updated_at":"2026-11-02T15:45:47.378563Z"},{"id":"GHSA-9j94-67jr-4cqj","title":"Rack session gets restored after deletion","description":"## Summary\n\nWhen using the `Rack::Session::Pool` middleware, simultaneous rack requests can restore a deleted rack session, which allows the unauthenticated user to occupy that session.\n\n## Details\n\n[Rack session middleware](https://github.com/rack/rack-session/blob/v2.1.0/lib/rack/session/abstract/id.rb#L271-L278) 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.\n\n## Impact\n\nWhen 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.\n\n## Mitigation\n\n- Update to the latest version of `rack-session`, or\n- Ensure your application invalidates sessions atomically by marking them as logged out e.g., using a `logged_out` flag, instead of deleting them, and check this flag on every request to prevent reuse, or\n- 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.\n\n## Related\n\nThis code was previously part of `rack` in Rack \u003c 3, see \u003chttps://github.com/rack/rack/security/advisories/GHSA-vpfw-47h7-xj4g\u003e for the equivalent advisory in `rack` (affecting Rack \u003c 3 only).","status":"published","published":"2025-05-08T14:45:33Z","modified":"2026-09-10T03:50:57.454921252Z","cvss":[{"version":"3.1","score":4.2,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N","level":"medium"}],"cwes":["CWE-362","CWE-367","CWE-613"],"updated_at":"2026-11-02T15:46:43.875515Z"},{"id":"UBUNTU-CVE-2025-46336","description":"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.","status":"published","published":"2025-05-08T20:15:00Z","modified":"2025-07-14T06:36:21.011906Z","cvss":[{"version":"3.1","score":4.2,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N","level":"medium"}],"updated_at":"2026-11-02T16:55:50.31802Z"},{"id":"openSUSE-SU-2025:15623-1","title":"ruby3.4-rubygem-rack-session-2.1.1-1.1 on GA media","description":"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.","status":"published","published":"2025-10-10T00:00:00Z","modified":"2026-03-23T04:54:01.526626Z","updated_at":"2026-11-02T16:58:37.810934Z"},{"id":"openSUSE-SU-2026:10359-1","title":"ruby4.0-rubygem-rack-session-2.1.1-1.3 on GA media","description":"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.","status":"published","published":"2026-03-13T00:00:00Z","modified":"2026-03-14T08:26:09.358214Z","updated_at":"2026-11-02T16:58:38.415593Z"}]}}
