{"id":"CVE-2022-23499","aliases":["CVE-2022-23499","GHSA-hvwx-qh2h-xcfj"],"related":[],"kind":"vulnerability","state":"published","title":"Cross-Site Scripting Protection bypass in HTML Sanitizer","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Problem\nDue to a parsing issue in the upstream package [`masterminds/html5`](https://packagist.org/packages/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`](https://packagist.org/packages/typo3/html-sanitizer).\n\nBesides 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.\n\n### Solution\nUpdate to `typo3/html-sanitizer` versions 1.5.0 or 2.1.1 that fix the problem described.","format":"markdown","source":"ghsa"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2022-12-13T16:59:12.000Z","modified":"2026-06-17T04:30:14.683Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":">= 1.0.0, < 1.5.0","status":"affected"},{"version":">= 2.0.0, < 2.1.1","status":"affected"}],"vendor":"TYPO3","product":"html-sanitizer","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"1.0.0","status":"affected","fixed":"1.5.0"}],"ecosystem":"Packagist","package":"typo3/html-sanitizer","purl":"pkg:composer/typo3/html-sanitizer","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"2.0.0","status":"affected","fixed":"2.1.1"}],"ecosystem":"Packagist","package":"typo3/html-sanitizer","purl":"pkg:composer/typo3/html-sanitizer","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"10.0.0","status":"affected","fixed":"10.4.33"}],"ecosystem":"Packagist","package":"typo3/cms","purl":"pkg:composer/typo3/cms","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"11.0.0","status":"affected","fixed":"11.5.20"}],"ecosystem":"Packagist","package":"typo3/cms","purl":"pkg:composer/typo3/cms","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"12.0.0","status":"affected","fixed":"12.1.1"}],"ecosystem":"Packagist","package":"typo3/cms","purl":"pkg:composer/typo3/cms","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"1.0.0","lastAffected":"1.0.7"},{"status":"affected","introduced":"2.0.0","fixed":"2.1.1"}],"vendor":"typo3","product":"html_sanitizer","cpe":"cpe:2.3:a:typo3:html_sanitizer:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/TYPO3/html-sanitizer/security/advisories/GHSA-hvwx-qh2h-xcfj","tags":["third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-23499","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/TYPO3/html-sanitizer/pull/105","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/TYPO3/html-sanitizer/pull/106","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/typo3/cms/CVE-2022-23499.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/TYPO3/html-sanitizer","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/TYPO3/html-sanitizer/releases/tag/v1.5.0","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/TYPO3/html-sanitizer/releases/tag/v2.1.1","tags":["web"],"sources":["ghsa"]},{"url":"https://typo3.org/security/advisory/typo3-core-sa-2022-017","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2025-04-23T13:52:30.940Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-23499","url":"https://www.cve.org/CVERecord?id=CVE-2022-23499","licence":"CVE Terms of Use","modified":"2025-04-23T16:28:29.503Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-hvwx-qh2h-xcfj","url":"https://github.com/advisories/GHSA-hvwx-qh2h-xcfj","licence":"CC-BY-4.0","modified":"2023-11-08T04:08:19.452Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-23499","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-23499","licence":"Public domain","modified":"2026-06-17T04:30:14.683Z"}],"updatedAt":"2026-11-25T22:58:17.510Z","epss":{"score":0.00484,"percentile":0.43341,"date":"2026-12-01T12:00:22.000Z"}}