CVE-2023-38500 By-passing Cross-Site Scripting Protection in HTML Sanitizer
Attackers can bypass XSS protection in TYPO3 HTML Sanitizer via malicious markup in noscript elements when that feature is enabled.
- 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-2023-38500?
CVE-2023-38500 is a medium-severity cross-site scripting vulnerability in TYPO3 html-sanitizer, published on 25 Jul 2023. 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
TYPO3 HTML Sanitizer is an HTML sanitizer, written in PHP, aiming to provide cross-site-scripting-safe markup based on explicitly allowed tags, attributes and values. Starting in version 1.0.0 and prior to versions 1.5.1 and 2.1.2, due to an encoding issue in the serialization layer, malicious markup nested in a `noscript` element was not encoded correctly. `noscript` is disabled in the default configuration, but might have been enabled in custom scenarios. This allows bypassing the cross-site scripting mechanism of TYPO3 HTML Sanitizer. Versions 1.5.1 and 2.1.2 fix the problem.
Weakness: CWE-79
Which versions are affected by CVE-2023-38500?
4 open source packages ship an affected version, including typo3/html-sanitizer. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
typo3/html-sanitizer Packagist | From 1.0.0 | 1.5.1 |
typo3/html-sanitizer Packagist | From 1.0.0 | 1.5.1 |
typo3/html-sanitizer Packagist | From 2.0.0 | 2.1.2 |
typo3/html-sanitizer Packagist | From 2.0.0 | 2.1.2 |
Products include Typo3 Html Sanitizer.
How do I fix CVE-2023-38500?
Upgrade typo3/html-sanitizer to a fixed version for your release line: 1.5.1 or 2.1.2.
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-2023-38500 being exploited?
There is no known exploitation of CVE-2023-38500 in the wild and no public exploit code.
Other vulnerabilities in TYPO3 html-sanitizer
Sources
Also known as GHSA-59jf-3q9v-rh6g.