PT-2026-63986 · Dompurify · Dompurify
CVSS v3.1
6.1
Medium
| Vector | AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Name of the Vulnerable Software and Affected Versions
DOMPurify versions 3.0.0 through 3.4.7
Description
When configured with
SAFE FOR TEMPLATES and a DOM output mode (RETURN DOM, RETURN DOM FRAGMENT, or IN PLACE), the software fails to strip template expressions such as ${evil}, {{evil}}, or <%evil%> within <template> element content. This occurs because the scrubTemplateExpressions() function uses a NodeIterator and node.normalize() that do not descend into template.content, allowing expressions formed by the merging of adjacent text nodes to survive sanitization. This bypasses the SAFE FOR TEMPLATES protection and may allow a downstream template engine to evaluate attacker-supplied expressions. The string output path is not affected.Recommendations
Update DOMPurify to version 3.4.8 or later.
Exploit
Fix
XSS
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Dompurify