dompurify
3.5.0 · 22 Nov 2026(MPL-2.0 OR Apache-2.0)106.1M / weekRepositorynpmAtom feed
Your version
3.5.0 is the newest release of 3.x.
In short
1 new4 changed
Security
Fixes 1 advisory that affected 3.4.8
- LowDOMPurify: Trusted Types policy survives `clearConfig()` and can poison later `RETURN_TRUSTED_TYPE` outputGHSA-vxr8-fq34-vvx9 · 15 Jun 2026Fixed in 3.4.9
7 advisories affect 3.4.9; 3.4.17 fixes them
- ModerateDOMPurify: IN_PLACE hook removal leaves a detached subtree executable, causing XSSGHSA-55q2-fjhq-7xh7 · 7 Aug 2026Fixed in 3.4.13
- ModerateDOMPurify: Permanent `ALLOWED_ATTR` pollution via `setConfig()` bypassing the hook clone-guard (incomplete fix of the 3.4.7 hook-pollution patch)GHSA-cmwh-pvxp-8882 · 18 Jun 2026Fixed in 3.4.11
- 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
2 more
- LowDOMPurify: IN_PLACE returns a force-removed rawtext root whose text carries attacker markup — pure HTML reparse executesGHSA-6688-9rhm-gjv2 · 5 Oct 2026Fixed in 3.4.16
- LowDOMPurify: `CUSTOM_ELEMENT_HANDLING` bypasses `afterSanitizeElements` for allowed custom elements.GHSA-c2j3-45gr-mqc4 · 21 Jul 2026Fixed in 3.4.12
Release note
Further improved the handling of Trusted Types config options, thanks @offset
Further improved the handling of
IN_PLACEsanitization, thanks @mozfreddybAdded more test coverage for
IN_PLACEand Trusted Types related usageBumped several dependencies where possible
Updated README and wiki with more accurate documentation & attack samples
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.