dompurify
3.5.0 · 22 Nov 2026(MPL-2.0 OR Apache-2.0)106.1M / weekRepositorynpmAtom feed
3.5.0 is the newest release of 3.x.
In short
1 new3 fixed3 changed
Security
Fixes 3 advisories that affected 3.4.16
- LowDOMPurify SAFE_FOR_TEMPLATES bypass: split template expressions survive in attached shadow root content on DOM output modesGHSA-cg2g-xh64-v4q7 · 22 Oct 2026Fixed in 3.4.17
- LowDOMPurify IN_PLACE: hook that removes a parent or sibling leaves the detached subtree's event handlers armed (incomplete fix for GHSA-p98j-92pf-mc4p)GHSA-mrv2-3pqr-j5jr · 22 Oct 2026Fixed in 3.4.17
- LowDOMPurify: SMIL attributeName=href guard is skipped when PARSER_MEDIA_TYPE is application/xhtml+xmlGHSA-c6gr-qvv4-5v3f · 22 Oct 2026Fixed in 3.4.17
Release note
Fixed an issue with
IN_PLACE,SAFE_FOR_TEMPLATESand shadow roots, thanks @manus-piFixed
IN_PLACEhandling of nodes that hooks or custom elements tough during sanitization, thanks @uttej-badwaneFixed the SMIL
attributeNameguard in XHTML mode, thanks @KoukyosyumeiHardened several smaller edge cases (namespaces, literal-text elements,
isValidAttribute()), thanks @artiphishellAdded a purify-edge test runner as a compatibility check, thanks @anzal1
Clarified the
IN_PLACEdocumentation in the README about possible risksUpdated several dependencies
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.