{"id":"CVE-2024-54133","published":"2024-12-10T22:52:04Z","modified":"2025-03-07T00:10:45Z","title":"Possible Content Security Policy bypass in Action Dispatch","vendor":"rails","product":"rails","tier":"tail","description":{"text":"Action Pack is a framework for handling and responding to web requests. There is a possible Cross Site Scripting (XSS) vulnerability  in the `content_security_policy` helper starting in version 5.2.0 of Action Pack and prior to versions 7.0.8.7, 7.1.5.1, 7.2.2.1, and 8.0.0.1. 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. Versions 7.0.8.7, 7.1.5.1, 7.2.2.1, and 8.0.0.1 contain a fix. As a workaround, applications can avoid setting CSP headers dynamically from untrusted input, or can validate/sanitize that input.","provenance":"source","from":"CVE.org"},"cvss":{"score":2.3,"severity":"LOW","version":"4.0","vector":"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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.0165,"percentile":0.76891,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"references":[{"url":"https://github.com/rails/rails/security/advisories/GHSA-vfm5-rmrh-j26v","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/rails/rails/commit/2e3f41e4538b9ca1044357f6644f037bbb7c6c49","tags":["x_refsource_MISC"]},{"url":"https://github.com/rails/rails/commit/3da2479cfe1e00177114b17e496213c40d286b3a","tags":["x_refsource_MISC"]},{"url":"https://github.com/rails/rails/commit/5558e72f22fc69c1c407b31ac5fb3b4ce087b542","tags":["x_refsource_MISC"]},{"url":"https://github.com/rails/rails/commit/cb16a3bb515b5d769f73926d9757270ace691f1d","tags":["x_refsource_MISC"]},{"url":"https://security.netapp.com/advisory/ntap-20250306-0010/","tags":[]}],"priority":{"score":17.0,"factors":[{"name":"EPSS percentile","points":15.38},{"name":"CVSS severity","points":1.61}]},"vendorSlug":"rails","affectedVersions":[{"vendor":"rails","product":"rails","versions":[">= 5.2.0, < 7.0.8.7",">= 7.1.0, < 7.1.5.1",">= 7.2.0, < 7.2.2.1",">= 8.0.0, < 8.0.0.1"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2024-12-11T16:05:59.623098Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"RubyGems","package":"actionpack","vulnerableRanges":[">=5.2.0, <7.0.8.7",">=7.1.0, <7.1.5.1",">=7.2.0, <7.2.2.1",">=8.0.0, <8.0.0.1"],"patched":["7.0.8.7","7.1.5.1","7.2.2.1","8.0.0.1"],"from":["GHSA-vfm5-rmrh-j26v"],"provenance":"source"}],"summary":{"text":"A flaw in Action Pack's content_security_policy helper in Rails lets applications that build Content-Security-Policy headers from untrusted user input have new directives injected into the policy, enabling a cross-site scripting bypass. An attacker who can supply crafted input to that header generation, with a user interaction such as visiting a page or following a link, could weaken the policy's XSS protection, and the attack needs no authentication and no network access beyond reaching the vulnerable application.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:45:36Z"},"euvd":{"id":"EUVD-2024-3509","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-rails-cve-2022-22577","parents":[{"from":"CVE-2022-22577","to":"CVE-2024-54133","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["actionpack/lib/action_dispatch/http/content_security_policy.rb"],"commits":["https://github.com/rails/rails/commit/2b820a2a69fa50cffa74b4aedc57bf92ed6910ec","https://github.com/rails/rails/commit/5299b57d596ea274f77f5ffee2b79c6ee0255508","https://github.com/rails/rails/commit/2e3f41e4538b9ca1044357f6644f037bbb7c6c49","https://github.com/rails/rails/commit/3da2479cfe1e00177114b17e496213c40d286b3a"],"basis":"rarely changed file"},{"kind":"similar","provenance":"machine","score":0.42,"basis":"same package + description similarity"}]}],"packageHistory":[{"cve":"CVE-2024-28103","published":"2024-06-04","fixed":"7.2.0.beta2","kev":false},{"cve":"CVE-2024-41128","published":"2024-10-16","fixed":"7.2.1.1","kev":false},{"cve":"CVE-2024-47887","published":"2024-10-16","fixed":"7.2.1.1","kev":false,"link":{"from":"CVE-2024-47887","to":"CVE-2024-54133","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"RubyGems:actionpack","fromFixed":"7.0.8.5","toFixed":"7.0.8.7","daysApart":55}]}},{"cve":"CVE-2024-54133","published":"2024-12-10","fixed":"8.0.0.1","kev":false},{"cve":"CVE-2026-33167","published":"2026-03-23","fixed":"8.1.2.1","kev":false},{"cve":"CVE-2026-126067","published":"2026-11-10","fixed":"8.1.4.1","kev":false},{"cve":"CVE-2026-126072","published":"2026-11-10","fixed":"8.1.4.1","kev":false}],"package":"RubyGems:actionpack"}}