Browser Sanitizer APIs Strengthen XSS Defenses After Chrome Bypasses
Vulnerability Disclosure · 2 sources · Updated 3mo ago · First seen Apr 7, 2026

Mozilla introduced setHTML in Firefox 148 as a safer alternative to innerHTML, using built-in HTML sanitization to reduce cross-site scripting (XSS) exposure when applications insert untrusted markup. The change aims to give developers a browser-native mechanism that avoids unsafe parsing and rendering patterns associated with direct HTML injection.
Researchers also identified two XSS bypasses in Chrome 146's Sanitizer API implementation. One used SVG animation and the malformed namespaced attribute xlink:href:x to evade an attribute-blocking check; another allowed an invalid javascript: URL that GET-form URL rewriting converted into executable JavaScript. Chrome remediated both flaws in version 147, released April 7, 2026; organizations should ensure managed Chrome deployments are updated and treat browser sanitization APIs as defense-in-depth rather than a substitute for contextual output encoding and input controls.


