dompurify
3.5.0 · 22 Nov 2026(MPL-2.0 OR Apache-2.0)106.1M / weekRepositorynpmAtom feed
Upgrading dompurify From 3.4.6 to 3.4.7
1 release in betweenevery note read
- 1
- change to make
- 3
- advisories fixed
- 0
- new
- 0
- fixes
Before you upgrade
Tick each one off as you go- Breaking3.4.7
Security
9 advisories still affect 3.4.7
- DOMPurify: IN_PLACE hook removal leaves a detached subtree executable, causing XSSmoderate · GHSA-55q2-fjhq-7xh7
- DOMPurify: IN_PLACE returns a force-removed rawtext root whose text carries attacker markup — pure HTML reparse executeslow · GHSA-6688-9rhm-gjv2
- DOMPurify: `CUSTOM_ELEMENT_HANDLING` bypasses `afterSanitizeElements` for allowed custom elements.low · GHSA-c2j3-45gr-mqc4
Upgrading to 3.4.17 clears them.
Fixes 3 advisories affecting 3.4.6
- DOMPurify: Hook mutation of `data.allowedTags` / `data.allowedAttributes` permanently pollutes `DEFAULT_ALLOWED_TAGS` / `DEFAULT_ALLOWED_ATTR`moderate · GHSA-76mc-f452-cxcm
- DOMPurify IN_PLACE Sanitization Bypass via Attached Shadow Root Inside <template>.contentmoderate · GHSA-rp9w-3fw7-7cwq
- DOMPurify: `IN_PLACE` mode trusts attacker-controlled `nodeName` on live non-form nodes, allowing script retention and XSS via attacker-supplied DOM objectslow · GHSA-x4vx-rjvf-j5p4
2 other lines we could not sort, mostly version bumps
- 3.4.7
Hardened the handling of Shadow Roots when using
IN_PLACE, thanks @GameZoneHacker - 3.4.7
Refactored the test suite and expanded test coverage significantly
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.