CVE-2026-65900

DOMPurify versions >=3.0.0 and before 3.4.8, when configured with SAFE_FOR_TEMPLATES together with a DOM output mode (RETURN_DOM, RETURN_DOM_FRAGMENT, or IN_PLACE), fail to strip template expressions (e.g. ${evil}, {{evil}}, <%evil%>) inside <template> element content. The final normalization/scrub pass (_scrubTemplateExpressions) uses a NodeIterator and node.normalize() that do not descend into template.content, so expressions that only form after adjacent text nodes merge survive sanitization. This bypasses SAFE_FOR_TEMPLATES and can allow a downstream template engine to evaluate attacker-supplied expressions. The string output path is not affected.
Configurations

Configuration 1 (hide)

cpe:2.3:a:cure53:dompurify:*:*:*:*:*:*:*:*

History

24 Oct 2026, 13:10

Type Values Removed Values Added
Summary
  • (es) Las versiones de DOMPurify >=3.0.0 y anteriores a la 3.4.8, cuando se configuran con SAFE_FOR_TEMPLATES junto con un modo de salida DOM (RETURN_DOM, RETURN_DOM_FRAGMENT o IN_PLACE), no logran eliminar las expresiones de plantilla (p. ej., ${evil}, {{evil}}, <%evil%>) dentro del contenido del elemento [template]. La pasada final de normalización/limpieza (_scrubTemplateExpressions) utiliza un NodeIterator y node.normalize() que no descienden en template.content, por lo que las expresiones que solo se forman después de que los nodos de texto adyacentes se fusionan sobreviven a la sanitización. Esto elude SAFE_FOR_TEMPLATES y puede permitir que un motor de plantillas posterior evalúe expresiones proporcionadas por el atacante. La ruta de salida de cadena no se ve afectada.

Information

Published : 2026-07-23 14:18

Updated : 2026-10-24 13:10


NVD link : CVE-2026-65900

Mitre link : CVE-2026-65900

CVE.ORG link : CVE-2026-65900


JSON object : View

Products Affected

cure53

  • dompurify
CWE
CWE-79

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')