Intel

AIKIDO-2026-11156

dompurify is vulnerable to Cross-Site Scripting (XSS)

CVE-2026-65900Published Jun 11, 2026
June 11, 2026

26

CVE Score

Low

Cross-Site Scripting (XSS)

Are you affected? Scan for Free

TL;DR

When DOMPurify.sanitize runs with SAFE_FOR_TEMPLATES together with RETURN_DOM, RETURN_DOM_FRAGMENT, or IN_PLACE, attacker HTML inside a template element can keep split template-literal, mustache, or ERB fragments in template.content. The final _scrubTemplateExpressions pass never entered template.content, so adjacent text nodes that only form expressions after normalization could survive. Downstream template evaluation or normalization can then execute the recovered expression as script. The fix recurses _scrubTemplateExpressions into each template.content, mirroring shadow-DOM traversal.

How do I fix this?

Upgrade the dompurify library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and sanitize attacker-controlled HTML with SAFE_FOR_TEMPLATES enabled together with RETURN_DOM, RETURN_DOM_FRAGMENT, or IN_PLACE.

Package

Versions

3.0.0 - 3.4.7

Fixed in 3.4.8

Background info

dompurify is vulnerable to Cross-Site Scripting (XSS) in versions 3.0.0 - 3.4.7.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea