REDHAT-BUG-2500564: XSS
DOMPurify is a DOM-only cross-site scripting sanitizer for HTML, MathML, and SVG. In 3.4.4, DOMPurify allowed selectedcontent by default, allowing browsers to re-clone an XSS payload after sanitization so that unsanitized markup inside <selectedcontent> is returned. This issue is fixed in version 3.4.5.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
DOMPurifyto a version that resolves this vulnerability.Fixed in 3.4.5
Event History
Frequently Asked Questions
Which DOMPurify configurations are affected?
Version 3.4.4 is affected because selectedcontent is allowed by default. Sanitization involving markup that contains a <selectedcontent> element can return unsanitized content when the browser re-clones the payload.
What does an attacker need to exploit this issue?
An attacker needs a way to supply HTML, MathML, or SVG markup that is processed by DOMPurify. The exploit relies on placing an XSS payload inside <selectedcontent> so it is re-cloned after sanitization.
What should be done to remediate the issue?
Update DOMPurify to version 3.4.5, which fixes the issue.