6.1medium
Cross-Site Scripting Protection bypass in HTML Sanitizer
- Severity
- 6.1medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.48% (higher than 43% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-hvwx-qh2h-xcfj
Description
HTML sanitizer is written in PHP, aiming to provide XSS-safe markup based on explicitly allowed tags, attributes and values. In versions prior to 1.5.0 or 2.1.1, malicious markup used in a sequence with special HTML CDATA sections cannot be filtered and sanitized due to a parsing issue in the upstream package masterminds/html5. This allows bypassing the cross-site scripting mechanism of typo3/html-sanitizer. The upstream package masterminds/html5 provides HTML raw text elements (`script`, `style`, `noframes`, `noembed` and `iframe`) as DOMText nodes, which were not processed and sanitized further. None of the mentioned elements were defined in the default builder configuration, that's why only custom behaviors, using one of those tag names, were vulnerable to cross-site scripting. This issue has been fixed in versions 1.5.0 and 2.1.1.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| TYPO3 html-sanitizer | >= 1.0.0, < 1.5.0, >= 2.0.0, < 2.1.1 | CVE List |
| typo3/html-sanitizer (Packagist) | from 1.0.0 before 1.5.0, from 2.0.0 before 2.1.1 | GitHub Advisory Database |
| typo3/cms (Packagist) | from 10.0.0 before 10.4.33, from 11.0.0 before 11.5.20, from 12.0.0 before 12.1.1 | GitHub Advisory Database |
| typo3 html_sanitizer | from 1.0.0 up to 1.0.7, from 2.0.0 before 2.1.1 | NVD |
All scores
| GitHub_M | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| GitHub | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| NVD | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
HTML sanitizer is written in PHP, aiming to provide XSS-safe markup based on explicitly allowed tags, attributes and values. In versions prior to 1.5.0 or 2.1.1, malicious markup used in a sequence with special HTML CDATA sections cannot be filtered and sanitized due to a parsing issue in the upstream package masterminds/html5. This allows bypassing the cross-site scripting mechanism of typo3/html-sanitizer. The upstream package masterminds/html5 provides HTML raw text elements (`script`, `style`, `noframes`, `noembed` and `iframe`) as DOMText nodes, which were not processed and sanitized further. None of the mentioned elements were defined in the default builder configuration, that's why only custom behaviors, using one of those tag names, were vulnerable to cross-site scripting. This issue has been fixed in versions 1.5.0 and 2.1.1.
GitHub Advisory Database
Problem
Due to a parsing issue in the upstream package masterminds/html5, malicious markup used in a sequence with special HTML CDATA sections cannot be filtered and sanitized. This allows bypassing the cross-site scripting mechanism of typo3/html-sanitizer.
Besides that, the upstream package masterminds/html5 provides HTML raw text elements (script, style, noframes, noembed and iframe) as DOMText nodes, which were not processed and sanitized further. None of the mentioned elements were defined in the default builder configuration, that's why only custom behaviors, using one of those tag names, were vulnerable to cross-site scripting.
Solution
Update to typo3/html-sanitizer versions 1.5.0 or 2.1.1 that fix the problem described.
NVD (es)
HTML Sanitizer está escrito en PHP y tiene como objetivo proporcionar un marcado seguro para XSS basado en etiquetas, atributos y valores explícitamente permitidos. En versiones anteriores a 1.5.0 o 2.1.1, el marcado malicioso utilizado en una secuencia con secciones CDATA HTML especiales no se puede filtrar ni sanitizar debido a un problema de análisis en el paquete masterminds/html5. Esto permite evitar el mecanismo de Cross-Site Scripting de typo3/html-sanitizer. El paquete original masterminds/html5 proporciona elementos de texto HTML sin formato (`script`, `style`, `noframes`, `noembed` y `iframe`) como nodos DOMText, que no fueron procesados ni sanitizados más. Ninguno de los elementos mencionados se definió en la configuración predeterminada del generador, es por eso que solo los comportamientos personalizados, que usaban uno de esos nombres de etiquetas, eran vulnerables a las Cross-Site Scripting. Este problema se solucionó en las versiones 1.5.0 y 2.1.1.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2022-23499 changed 2025-04-23 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-hvwx-qh2h-xcfj changed 2023-11-08 | CC-BY-4.0 |
| NVD | CVE-2022-23499 changed 2026-06-17 | Public domain |