Skip to content

Write-ups

DOMPurify

Every publicly disclosed report for DOMPurify and what kind of bugs they were.

disclosed reports
4
most reported class
XSS
bug classes found
1

Disclosed reports

Newest first. Only what DOMPurify chose to make public.

XSS

Intigriti XSS Challenge July 2024 — Finding a new DOMPurify bug

The challenge page had a DOM-based XSS vulnerability protected by CSP, and the author found a way to bypass it by using DOM clobbering to trigger a development code path and a new DOMPurify bug that caused an uncaught error, leading to script execution. An attacker could execute arbitrary JavaScript in the context of the challenge page.

DOMPurify

XSS

Bypassing DOMPurify with good old XML

DOMPurify, when sanitising XML documents, failed to account for parsing differences between XML and HTML, allowing an attacker to inject malicious markup that would be executed when the sanitised output was later used in an HTML context. This could lead to cross-site scripting.

DOMPurify

XSS

DOM Purify - untrusted Node bypass

DOMPurify's node iterator did not include processing instructions, so an XML processing instruction inside an SVG could survive sanitisation and be reinterpreted by the HTML parser as markup containing an event handler. An attacker could use this to run script on a page that sanitised untrusted nodes, even where a CSP blocked direct exploitation of the uploaded file.

DOMPurify

XSS

Playing with DOMPurify custom elements handling

DOMPurify 3.0.8 with overly permissive CUSTOM_ELEMENT_HANDLING and a custom FORBID_CONTENTS list allowed namespace confusion, enabling an attacker to inject an XSS payload that bypassed the sanitizer.

DOMPurify