CVE-2024-32970
Cross-site Scripting (XSS) possible with maliciously formed HTML attribute names and values in Phlex
Severity Score
Exploit Likelihood
Affected Versions
Public Exploits
0Exploited in Wild
-Decision
Descriptions
Phlex is a framework for building object-oriented views in Ruby. In affected versions there is a potential cross-site scripting (XSS) vulnerability that can be exploited via maliciously crafted user data. Since the last two vulnerabilities https://github.com/phlex-ruby/phlex/security/advisories/GHSA-242p-4v39-2v8g and https://github.com/phlex-ruby/phlex/security/advisories/GHSA-g7xq-xv8c-h98c, we have invested in extensive browser tests. It was these new tests that helped us uncover these issues. As of now the project exercises every possible attack vector the developers can think of — including enumerating every ASCII character, and we run these tests in Chrome, Firefox and Safari. Additionally, we test against a list of 6613 known XSS payloads (see: payloadbox/xss-payload-list). The reason these issues were not detected before is the escapes were working as designed. However, their design didn't take into account just how recklessly permissive browsers are when it comes to executing unsafe JavaScript via HTML attributes. If you render an `<a>` tag with an `href` attribute set to a user-provided link, that link could potentially execute JavaScript when clicked by another user. If you splat user-provided attributes when rendering any HTML or SVG tag, malicious event attributes could be included in the output, executing JavaScript when the events are triggered by another user. Patches are available on RubyGems for all minor versions released in the last year. Users are advised to upgrade. Users unable to upgrade should configure a Content Security Policy that does not allow `unsafe-inline` which would effectively prevent this vulnerability from being exploited. Users who upgrade are also advised to configure a Content Security Policy header that does not allow `unsafe-inline`.
Phlex es un framework para crear vistas orientadas a objetos en Ruby. En las versiones afectadas existe una posible vulnerabilidad de Cross Site Scripting (XSS) que puede explotarse a través de datos de usuario creados con fines malintencionados. Desde las dos últimas vulnerabilidades https://github.com/phlex-ruby/phlex/security/advisories/GHSA-242p-4v39-2v8g y https://github.com/phlex-ruby/phlex/security/advisories/GHSA -g7xq-xv8c-h98c, hemos invertido en pruebas exhaustivas del navegador. Fueron estas nuevas pruebas las que nos ayudaron a descubrir estos problemas. A partir de ahora, el proyecto practica todos los posibles vectores de ataque que los desarrolladores puedan imaginar, incluida la enumeración de cada carácter ASCII, y ejecutamos estas pruebas en Chrome, Firefox y Safari. Además, realizamos pruebas con una lista de 6613 cargas útiles XSS conocidas (consulte: payloadbox/xss-payload-list). La razón por la que estos problemas no se detectaron antes es que los escapes funcionaban según lo manipulado. Sin embargo, su diseño no tuvo en cuenta cuán imprudentemente permisivos son los navegadores cuando se trata de ejecutar JavaScript inseguro a través de atributos HTML. Si representa una etiqueta `<a rel="nofollow">` con un atributo `href` establecido en un enlace proporcionado por el usuario, ese enlace podría ejecutar JavaScript cuando otro usuario haga clic en él. Si agrega atributos proporcionados por el usuario al representar cualquier etiqueta HTML o SVG, se podrían incluir atributos de eventos maliciosos en la salida, ejecutando JavaScript cuando los eventos sean activados por otro usuario. Los parches están disponibles en RubyGems para todas las versiones menores lanzadas el año pasado. Se recomienda a los usuarios que actualicen. Los usuarios que no puedan actualizar deben configurar una Política de seguridad de contenido que no permita "inseguro en línea", lo que evitaría efectivamente que se aproveche esta vulnerabilidad. También se recomienda a los usuarios que actualicen que configuren un encabezado de Política de seguridad de contenido que no permita "inseguro en línea".</a>
CVSS Scores
SSVC
- Decision:Track
Timeline
- 2024-04-22 CVE Reserved
- 2024-04-30 CVE Published
- 2024-05-01 EPSS Updated
- 2024-08-02 CVE Updated
- ---------- Exploited in Wild
- ---------- KEV Due Date
- ---------- First Exploit
CWE
- CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
CAPEC
References (6)
URL | Tag | Source |
---|---|---|
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy | X_refsource_misc | |
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy#unsafe-inline | X_refsource_misc | |
https://github.com/payloadbox/xss-payload-list | X_refsource_misc | |
https://github.com/phlex-ruby/phlex/commit/da8f94342a84cff9d78c98bcc3b3604ee2e577d2 | X_refsource_misc | |
https://github.com/phlex-ruby/phlex/security/advisories/GHSA-9p57-h987-4vgx | X_refsource_confirm | |
https://rubygems.org/gems/phlex | X_refsource_misc |
URL | Date | SRC |
---|
URL | Date | SRC |
---|
URL | Date | SRC |
---|
Affected Vendors, Products, and Versions
Vendor | Product | Version | Other | Status | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Vendor | Product | Version | Other | Status | <-- --> | Vendor | Product | Version | Other | Status |
Phlex-ruby Search vendor "Phlex-ruby" | Phlex Search vendor "Phlex-ruby" for product "Phlex" | < 1.9.3 Search vendor "Phlex-ruby" for product "Phlex" and version " < 1.9.3" | en |
Affected
| ||||||
Phlex-ruby Search vendor "Phlex-ruby" | Phlex Search vendor "Phlex-ruby" for product "Phlex" | >= 1.10.0 < 1.10.2 Search vendor "Phlex-ruby" for product "Phlex" and version " >= 1.10.0 < 1.10.2" | en |
Affected
|