CVE-2024-54133
JSON

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 packageVersionsReported 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.1CVE 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.1GitHub 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.1Bitnami Vulnerability Database

All scores

GitHub_M2.3low CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
GitHublow CVSS:4.0CVSS: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 Databaselow rating

Classification

CWE-79

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

SourceRecordLicence
CVE ListCVE-2024-54133 changed 2025-03-07CVE Terms of Use
GitHub Advisory DatabaseGHSA-vfm5-rmrh-j26v changed 2025-03-07CC-BY-4.0
NVDCVE-2024-54133 changed 2026-06-17Public domain
Bitnami Vulnerability DatabaseBIT-RAILS-2024-54133 changed 2025-10-06Apache-2.0