A DOMPurify template-safety bypass can reactivate markup after sanitization
DOMPurify is often used as the boundary between untrusted HTML and a browser DOM. A newly published advisory shows why that boundary also depends on what the application does with the returned string. Under SAFE_FOR_TEMPLATES: true, sanitized output can contain fragments that combine during a second parse into a live template expression. A framework that compiles that DOM can then execute the expression.
The issue is tracked as CVE-2026-144292 and affects DOMPurify releases before 3.5.0. The vendor published the advisory as low severity, while CVE data carries a higher score. The operational decision should follow the actual data flow: a low score does not help if a reachable page reparses the sanitized string as a Vue or AngularJS template.
Where the bypass occurs
SAFE_FOR_TEMPLATES is intended to remove expressions such as {{...}} before their output reaches a template engine. The advisory shows that checking individual text nodes and the serialized string does not cover every way the browser can reconstruct those delimiters. A nested form boundary can cause the opening and closing braces to belong to different text contexts in the sanitized result, then rejoin when that result is assigned to innerHTML.
The maintainers reproduced the issue with Vue 3 in-DOM templates and AngularJS 1.8.3. The attacker controls the markup supplied to sanitize(). The application must use SAFE_FOR_TEMPLATES: true and later pass the returned string through a DOM template compiler. Those conditions are specific, but they describe a common attempt to compose two security controls without verifying that the composition remains safe.
Impact
Successful exploitation gives arbitrary JavaScript execution in the origin that renders the page. That access can read data available to the page, act with the user's session, submit requests and alter visible content. The vulnerable operation is client side, so a network scanner cannot reliably identify affected deployments from a version banner. Inventory needs to come from package manifests and the code path that invokes DOMPurify.
The advisory does not establish that public exploitation is widespread. It does provide a reproducible mechanism and identifies the versions where the protection can fail. Treat that evidence as enough to patch exposed user-content paths, especially when the sanitized result is inserted into an application that compiles templates from the DOM.
Remediation
Upgrade DOMPurify to 3.5.0 or later. Search source and dependency locks for SAFE_FOR_TEMPLATES, innerHTML, Vue in-DOM templates and AngularJS compilation paths. A package update removes the known implementation gap, but the safer design is to keep sanitized HTML separate from template source. If a product needs templates, render trusted templates first and insert only vetted, non-template user data.
Add a regression test that uses the published structure from the advisory and confirms that no framework expression executes after the sanitized result is parsed. Review whether a strict Content Security Policy blocks inline execution and string-to-code paths. Those controls reduce impact, but they do not replace the fixed parser.
Teams should also inventory the route between user input and the second parse. A page that only displays sanitized HTML is not equivalent to a page that hands that HTML to a template compiler. The latter needs a direct code review, even when the package appears in a seemingly harmless sanitizer dependency.