CVE-2024-54133 — Possible Content Security Policy bypass in actionpack
Possible Content Security Policy bypass in Action Dispatch
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (1.65%). Schedule for your next planned update.
Does your project use an affected actionpack version?
Paste your Gemfile.lock to check it for CVE-2024-54133 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
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!
Advisory Timeline
- First published December 10, 2024 (716 days ago).
- Last revised March 7, 2025 — 86 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
gem install actionpack -v 8.0.0.1
gem install actionpack -v 7.1.5.1
gem install actionpack -v 7.2.2.1
gem install actionpack -v 7.0.8.7
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (4)
Affects 1 ecosystem: RubyGems (1).
| Package | Fixed In |
|---|---|
| actionpack RubyGems · Affected: 8.0.0 | 8.0.0.1 |
| actionpack RubyGems · Affected: 7.1.0, 7.1.1, 7.1.2, 7.1.3 (+8 more) | 7.1.5.1 |
| actionpack RubyGems · Affected: 7.2.0, 7.2.1, 7.2.1.1, 7.2.1.2 (+1 more) | 7.2.2.1 |
| actionpack RubyGems · Affected: 5.2.0, 5.2.1, 5.2.1.1, 5.2.1.rc1 (+120 more) | 7.0.8.7 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-79Cross-site Scripting (XSS)MITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 5.7 score means for each attack dimension.
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
References
- https://github.com/rails/rails/security/advisories/GHSA-vfm5-rmrh-j26vWEB
- https://nvd.nist.gov/vuln/detail/CVE-2024-54133ADVISORY
- https://github.com/rails/rails/commit/2e3f41e4538b9ca1044357f6644f037bbb7c6c49WEB
- https://github.com/rails/rails/commit/3da2479cfe1e00177114b17e496213c40d286b3aWEB
- https://github.com/rails/rails/commit/5558e72f22fc69c1c407b31ac5fb3b4ce087b542WEB
- https://github.com/rails/rails/commit/cb16a3bb515b5d769f73926d9757270ace691f1dWEB
- https://github.com/rails/railsPACKAGE
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/actionpack/CVE-2024-54133.ymlWEB
- https://security.netapp.com/advisory/ntap-20250306-0010WEB
Frequently Asked Questions
- What is CVE-2024-54133?
- Possible Content Security Policy bypass in Action Dispatch. This vulnerability has been assigned a severity rating of LOW (CVSS score: 5.7/10).
- How do I check if my project is affected by CVE-2024-54133?
- CVE-2024-54133 affects actionpack. It has a 1.7% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2024-54133 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Exploitation requires specific conditions, or the impact is limited.
This places it in the top quartile of EPSS-scored vulnerabilities — 76.9% of tracked vulnerabilities score at or below it, so it is more likely to be exploited than most of the tracked corpus.
Also Known As
Related CVEs
- CVE-2022-23633HIGH
Exposure of information in Action Pack
- CVE-2011-1497MEDIUM
Cross site scripting in actionpack Rubygem
- CVE-2021-44528MEDIUM
actionpack Open Redirect in Host Authorization Middleware
- CVE-2026-126073MEDIUM
Action Pack: Possible cache poisoning in Action Pack content negotiation
- CVE-2026-126072MEDIUM
Action Pack: Possible DoS vulnerability in Action Controller Live streaming
- CVE-2024-47887MEDIUM
Possible ReDoS vulnerability in HTTP Token authentication in Action Controller
- CVE-2016-2097MEDIUM
actionview contains Path Traversal vulnerability
- CVE-2026-33167LOW
Rails has a possible XSS vulnerability in its Action Pack debug exceptions