2.3low
Possible Content Security Policy bypass in Action Dispatch
- Severity
- 2.3low CVSS:4.0 by GitHub_M
- Exploit likelihood
- 1.00% (higher than 63% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-vfm5-rmrh-j26vBIT-RAILS-2024-54133
Description
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| rails rails | >= 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 | CVE List |
| actionpack (RubyGems) | from 5.2.0 before 7.0.8.7, from 7.1.0 before 7.1.5.1, from 7.2.0 before 7.2.2.1, from 8.0.0 before 8.0.0.1 | GitHub Advisory Database |
| rails (Bitnami) | from 5.2.0 before 7.0.9, from 7.1.0 before 7.1.4, from 7.2.0 before 7.2.2-2-0, from 8.0.0 before 8.0.1 | Bitnami Vulnerability Database |
All scores
| GitHub_M | 2.3low CVSS:4.0 | 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 |
| GitHub | low CVSS:4.0 | 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 |
| Bitnami Vulnerability Database | low rating |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
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.
GitHub Advisory Database
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!
NVD (es)
Action Pack es un framework para gestionar y responder a solicitudes web. Existe una posible vulnerabilidad de Cross Site Scripting (XSS) en el asistente `content_security_policy` a partir de la versión 5.2.0 de Action Pack y anteriores a las versiones 7.0.8.7, 7.1.5.1, 7.2.2.1 y 8.0.0.1. Las aplicaciones que establecen encabezados Content-Security-Policy (CSP) de forma dinámica a partir de una entrada de usuario no confiable pueden ser vulnerables a que las entradas cuidadosamente diseñadas puedan inyectar nuevas directivas en la CSP. Esto podría provocar una omisión de la CSP y su protección contra XSS y otros ataques. Las versiones 7.0.8.7, 7.1.5.1, 7.2.2.1 y 8.0.0.1 contienen una solución. Como workaround, las aplicaciones pueden evitar establecer encabezados CSP de forma dinámica a partir de una entrada no confiable, o pueden validar/sanear esa entrada.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-54133 changed 2025-03-07 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-vfm5-rmrh-j26v changed 2025-03-07 | CC-BY-4.0 |
| NVD | CVE-2024-54133 changed 2026-06-17 | Public domain |
| Bitnami Vulnerability Database | BIT-RAILS-2024-54133 changed 2025-10-06 | Apache-2.0 |