Possible Content Security Policy bypass in Action Dispatch
Published 10 Dec 2024 · Updated 7 Mar 2025
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
- >=5.2.0 <7.0.8.7
- Fixed in
- 7.0.8.7
bundle update --conservative actionpack # Gemfile: '>= 7.0.8.7'- Affected
- >=7.1.0 <7.1.5.1
- Fixed in
- 7.1.5.1
bundle update --conservative actionpack # Gemfile: '>= 7.1.5.1'- Affected
- >=7.2.0 <7.2.2.1
- Fixed in
- 7.2.2.1
bundle update --conservative actionpack # Gemfile: '>= 7.2.2.1'- Affected
- >=8.0.0 <8.0.0.1
- Fixed in
- 8.0.0.1
bundle update --conservative actionpack # Gemfile: '>= 8.0.0.1'Details
There is a possible Cross Site Scripting (XSS) vulnerability in the content_security_policy helper in Action Pack.
Impact ------ Applications which set Content-Security-Policy (CSP) headers dynamically from untrusted user input may be vulnerable to carefully crafted inputs being able to inject new directives into the CSP. This could lead to a bypass of the CSP and its protection against XSS and other attacks.
Releases -------- The fixed releases are available at the normal locations.
Workarounds ----------- Applications can avoid setting CSP headers dynamically from untrusted input, or can validate/sanitize that input.
Credits ------- Thanks to ryotak for the report!
Is GHSA-vfm5-rmrh-j26v 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
- LowCVE-2026-126067Action Pack: Missing SameSite attribute on session cookies from Action Pack session stores · 10 Nov 2026
- HighCVE-2026-126083Action Pack: Possible IP spoofing in Action Dispatch RemoteIp · 10 Nov 2026
References
- Linkgithub.com/rails/rails/security/advisories/GHSA-vfm5-rmrh-j26v
- Advisorynvd.nist.gov/vuln/detail/CVE-2024-54133
- Linkgithub.com/rails/rails/commit/2e3f41e4538b9ca1044357f6644f037bbb7c6c49
- Linkgithub.com/rails/rails/commit/3da2479cfe1e00177114b17e496213c40d286b3a
- Linkgithub.com/rails/rails/commit/5558e72f22fc69c1c407b31ac5fb3b4ce087b542
- Linkgithub.com/rails/rails/commit/cb16a3bb515b5d769f73926d9757270ace691f1d
- Packagegithub.com/rails/rails
- Linkgithub.com/rubysec/ruby-advisory-db/blob/master/gems/actionpack/CVE-2024-54133.yml
- Linksecurity.netapp.com/advisory/ntap-20250306-0010
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.