ADVISORIES

GitHub Advisory Database

GHSA-hvwx-qh2h-xcfj

TYPO3 HTML Sanitizer vulnerable to Cross-Site Scripting

Moderate CVE-2022-23499

Details

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.

Affected packages

EcosystemPackageAffected versions
Packagisttypo3/html-sanitizer
From 1.0.0 before 1.5.0 (fixed in 1.5.0)
Packagisttypo3/html-sanitizer
From 2.0.0 before 2.1.1 (fixed in 2.1.1)
Packagisttypo3/cms
From 10.0.0 before 10.4.33 (fixed in 10.4.33)
Packagisttypo3/cms
From 11.0.0 before 11.5.20 (fixed in 11.5.20)
Packagisttypo3/cms
From 12.0.0 before 12.1.1 (fixed in 12.1.1)

References