CVE-2022-23499 Cross-Site Scripting Protection bypass in HTML Sanitizer
Attacker can bypass XSS protection in custom HTML sanitizer configurations using specific CDATA sequences, leading to script execution.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2022-23499?
CVE-2022-23499 is a medium-severity cross-site scripting vulnerability in TYPO3 html-sanitizer, published on 13 Dec 2022. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official 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.
Weakness: CWE-79
Which versions are affected by CVE-2022-23499?
10 open source packages ship an affected version, including typo3/html-sanitizer and typo3/cms. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
typo3/html-sanitizer Packagist | From 1.0.0 | 1.5.0 |
typo3/html-sanitizer Packagist | From 1.0.0 | 1.5.0 |
typo3/html-sanitizer Packagist | From 2.0.0 | 2.1.1 |
typo3/html-sanitizer Packagist | From 2.0.0 | 2.1.1 |
typo3/cms Packagist | From 10.0.0 | 10.4.33 |
typo3/cms Packagist | From 10.0.0 | 10.4.33 |
4 more packages
typo3/cms Packagist | From 11.0.0 | 11.5.20 |
typo3/cms Packagist | From 11.0.0 | 11.5.20 |
typo3/cms Packagist | From 12.0.0 | 12.1.1 |
typo3/cms Packagist | From 12.0.0 | 12.1.1 |
Products include Typo3 Html Sanitizer.
How do I fix CVE-2022-23499?
Upgrade typo3/html-sanitizer to a fixed version for your release line: 1.5.0 or 2.1.1.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2022-23499 being exploited?
There is no known exploitation of CVE-2022-23499 in the wild and no public exploit code.
Other vulnerabilities in TYPO3 html-sanitizer
Sources
Also known as GHSA-hvwx-qh2h-xcfj.