THREATOPS
THREAT OPS › Threat News › [GHSA] GHSA-cg2g-xh64-v4q7 (critical) — DOMPurify SAFE_FOR_TEMPLATES bypass: split template expressions survive in attached shadow root content on DOM output modes

[GHSA] GHSA-cg2g-xh64-v4q7 (critical) — DOMPurify SAFE_FOR_TEMPLATES bypass: split template expressions survive in attached shadow root content on DOM output modes

highgithub_advisoriesPublished 2026-10-22

GHSA-cg2g-xh64-v4q7 Severity: critical CVE: None

DOMPurify SAFE_FOR_TEMPLATES bypass: split template expressions survive in attached shadow root content on DOM output modes

## Summary

When DOMPurify is configured with `SAFE_FOR_TEMPLATES: true` together with a DOM-returning mode (`RETURN_DOM: true`, `RETURN_DOM_FRAGMENT: true`, or `IN_PLACE: true`), template expressions such as `{{...}}`, `${..

MITRE ATT&CK techniques

Indicators of compromise

Original source: https://github.com/advisories/GHSA-cg2g-xh64-v4q7