← Lab /Security & privacy

Chrome Sanitizer API bypassed for XSS via xlink:href and invalid javascript URLs

Chrome's Sanitizer API can be bypassed to execute XSS using crafted xlink:href attributes and invalid javascript URLs.

Security & privacy Assetnote / Searchlight 22 May 2026 Attack Prototype evidence

Published as “Two Bypasses for Chrome's Sanitizer API”

Why it matters

These bypasses demonstrate that Chrome's Sanitizer API does not provide a reliable XSS barrier in its initial release.

Summary

The researchers examined Chrome 146's Sanitizer API and identified two distinct bypasses. The first manipulates the xlink:href attribute by appending an extra colon (xlink:href:x) to evade a strict string check, resulting in XSS. The second exploits a mismatch between KURL's full URL parsing and the fast-path ProtocolIsJavaScript check, using an invalid javascript://://-alert(1)// URL that becomes executable after a form GET mutation. Both bypasses were demonstrated with PoC payloads and have since been patched by Chrome.

What they found 2

  1. xlink:href:x payload bypasses the sanitizer and executes XSS

    “Thus, I tried xlink:href:x , and it worked! This achieves an XSS while bypassing the sanitizer.”

  2. Invalid javascript URL bypasses sanitizer and triggers alert after form GET mutation

    “Pre-patch, this would pass through the Sanitizer API untouched - but when you click on it, you get an alert.”

Caveats 4

  • Chrome fixed this in two ways:
  • While the techniques described are patched now, I am sure there are other techniques waiting to be discovered.
  • There is one problem with this 'bypass' - even though the javascript URL makes it to the DOM untouched, when you click on it, nothing happens.
  • The real reason is that the URL is invalid, so the browser will refuse to navigate to it or execute.

What’s new here 4

  • First bypass uses a malformed xlink:href attribute (xlink:href:x) to bypass sanitizer checks.
  • Second bypass leverages an invalid javascript URL combined with form GET mutation to trigger XSS.
  • Both bypasses were patched in Chrome after disclosure.
  • Shows that direct DOM-based sanitization can still be subverted by edge-case parsing behavior.