GitHub Advisoryadvisory · Packagist
GHSA-hvwx-qh2h-xcfj TYPO3 HTML Sanitizer vulnerable to Cross-Site Scripting
MEDIUM
Official page ↗
- Aliases
- CVE-2022-23499
- Ecosystem
- Packagist
- Packages
- typo3/html-sanitizer, typo3/cms
- Severity
- Moderate
- CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- Weaknesses
- CWE-79
- Reviewed
- 2022-12-13
Affected packages
• Packagist typo3/html-sanitizer: >= 1.0.0, < 1.5.0 → fixed in 1.5.0
• Packagist typo3/html-sanitizer: >= 2.0.0, < 2.1.1 → fixed in 2.1.1
• Packagist typo3/cms: >= 10.0.0, < 10.4.33 → fixed in 10.4.33
• Packagist typo3/cms: >= 11.0.0, < 11.5.20 → fixed in 11.5.20
• Packagist typo3/cms: >= 12.0.0, < 12.1.1 → fixed in 12.1.1
Description
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.
Related
Alias · CVE (1)
- CVE-2022-23499 HTML sanitizer is written in PHP, aiming to provide XSS-safe markup based on explicitly allowed tags, attributes and values. vulnerability
Weakness · CWE (1)
- CWE-79 Improper Neutralization of Input During Web Page Generation weakness
References
- https://github.com/TYPO3/html-sanitizer/security/advisories/GHSA-hvwx-qh2h-xcfj web
- https://nvd.nist.gov/vuln/detail/CVE-2022-23499 advisory
- https://github.com/TYPO3/html-sanitizer/pull/105 web
- https://github.com/TYPO3/html-sanitizer/pull/106 web
- https://github.com/FriendsOfPHP/security-advisories/blob/master/typo3/cms/CVE-2022-23499.yaml web
- https://github.com/TYPO3/html-sanitizer package
- https://github.com/TYPO3/html-sanitizer/releases/tag/v1.5.0 web
- https://github.com/TYPO3/html-sanitizer/releases/tag/v2.1.1 web
- https://typo3.org/security/advisory/typo3-core-sa-2022-017 web