CVE-2022-36020 Bypass of Cross-Site Scripting Protection in typo3/html-sanitizer

Medium 6.1 Published Updated

Attackers can bypass XSS protections in the TYPO3 HTML sanitizer library via malicious markup, requiring an upgrade to secure applications.

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-36020?

CVE-2022-36020 is a medium-severity cross-site scripting vulnerability in TYPO3 html-sanitizer, published on 13 Sep 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

The typo3/html-sanitizer package is an HTML sanitizer, written in PHP, aiming to provide XSS-safe markup based on explicitly allowed tags, attributes and values. Due to a parsing issue in the upstream package `masterminds/html5`, malicious markup used in a sequence with special HTML comments cannot be filtered and sanitized. This allows for a bypass of the cross-site scripting mechanism of `typo3/html-sanitizer`. This issue has been addressed in versions 1.0.7 and 2.0.16 of the `typo3/html-sanitizer` package. Users are advised to upgrade. There are no known workarounds for this issue.

Weakness: CWE-79

Which versions are affected by CVE-2022-36020?

12 open source packages ship an affected version, including typo3/html-sanitizer, typo3/cms and typo3/cms-core. It affects 1 product.

PackageAffectedFixed in
typo3/html-sanitizer PackagistFrom 1.0.01.0.7
typo3/html-sanitizer PackagistFrom 1.0.01.0.7
typo3/html-sanitizer PackagistFrom 2.0.02.0.16
typo3/html-sanitizer PackagistFrom 2.0.02.0.16
typo3/cms PackagistFrom 10.0.010.4.32
typo3/cms PackagistFrom 10.0.010.4.32
6 more packages
typo3/cms PackagistFrom 11.0.011.5.16
typo3/cms PackagistFrom 11.0.011.5.16
typo3/cms-core PackagistFrom 10.0.010.4.32
typo3/cms-core PackagistFrom 10.0.010.4.32
typo3/cms-core PackagistFrom 11.0.011.5.16
typo3/cms-core PackagistFrom 11.0.011.5.16

Products include Typo3 Html Sanitizer.

How do I fix CVE-2022-36020?

Upgrade typo3/html-sanitizer to a fixed version for your release line: 1.0.7 or 2.0.16.

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-36020 being exploited?

There is no known exploitation of CVE-2022-36020 in the wild and no public exploit code.

Sources

Also known as GHSA-47m6-46mj-p235.

Is CVE-2022-36020 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free