Action Pack: Missing SameSite attribute on session cookies from Action Pack session stores
Published 10 Nov 2026 · Updated 10 Nov 2026
Is your project on an affected actionpack?
Look after several Rails or Ruby apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected packages
- Affected
- >=8.1.0.beta1 <8.1.4.1
- Fixed in
- 8.1.4.1
bundle update --conservative actionpack # Gemfile: '>= 8.1.4.1'- Affected
- <8.0.5.2
- Fixed in
- 8.0.5.2
bundle update --conservative actionpack # Gemfile: '>= 8.0.5.2'Details
Impact
Action Pack session stores other than ActionDispatch::Session::CookieStore (CacheStore, MemCacheStore, and third-party stores built on AbstractStore, AbstractSecureStore or the session mixins) write the session cookie without a SameSite attribute, regardless of config.action_dispatch.cookies_same_site_protection, which defaults to :lax. Only CookieStore applies the configured policy. In browsers that do not treat a cookie without the attribute as SameSite=Lax, a cross-site request could carry the session cookie, possibly leading to cross-site request forgery against actions that do not verify an authenticity token, such as those of API-only applications.
Applications are affected when they use a session store other than CookieStore and do not pass same_site: to config.session_store.
Details
In the fixed releases, every session store sets the session cookie's SameSite attribute from cookies_same_site_protection when its options have no :same_site key. An explicit same_site: option, including same_site: nil, and a :same_site value in a store's DEFAULT_OPTIONS still take precedence.
Workarounds
Pass same_site: when configuring the session store, for example config.session_store :cache_store, same_site: :lax.
Releases
The fixed releases are available at the normal locations.
Patches for those who cannot upgrade at once:
- 8.1: https://github.com/rails/rails/commit/2d9f502df941e31ce9bad0e846564f49396bed46.patch
- 8.0: https://github.com/rails/rails/commit/f2392996be723708271a8d30bfcf0edc221e53ef.patch
Credit
This issue was responsibly reported by HackerOne researcher tjvc.
Is GHSA-gmj8-hvj3-49mw in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected actionpack, and gives you the command that fixes it.
More advisories for actionpack
- MediumCVE-2026-126072Action Pack: Possible DoS vulnerability in Action Controller Live streaming · 12 Nov 2026
- MediumCVE-2026-126077Action Pack: Possible sensitive session information leak in Active Storage proxy mode · 12 Nov 2026
- HighCVE-2026-126081Action Pack: Possible Strong Parameters Bypass in Parameters#each_key · 12 Nov 2026
- MediumCVE-2026-126073Action Pack: Possible cache poisoning in Action Pack content negotiation · 10 Nov 2026
- HighCVE-2026-126083Action Pack: Possible IP spoofing in Action Dispatch RemoteIp · 10 Nov 2026
- MediumCVE-2026-126076Action Pack: Possible restoration of destroyed sessions in Action Dispatch CacheStore · 10 Nov 2026
References
- Linkgithub.com/rails/rails/security/advisories/GHSA-gmj8-hvj3-49mw
- Linkgithub.com/rails/rails/commit/2d9f502df941e31ce9bad0e846564f49396bed46
- Linkgithub.com/rails/rails/commit/f2392996be723708271a8d30bfcf0edc221e53ef
- Packagegithub.com/rails/rails
- Linkgithub.com/rails/rails/releases/tag/v8.0.5.2
- Linkgithub.com/rails/rails/releases/tag/v8.1.4.1
- Linkgithub.com/rubysec/ruby-advisory-db/blob/master/gems/actionpack/GHSA-gmj8-hvj3-49mw.yml
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.