Packages

dompurify

3.5.0 · 22 Nov 2026(MPL-2.0 OR Apache-2.0)106.1M / weekRepositorynpmAtom feed

Your version

3.4.18

14 Nov 2026Where it was published

3.5.0 is the newest release of 3.x.

Summary· from the note as AI read it

Security fixUpgrade: this release fixes a security issue.

Security

  • Upgrade to close the SAFE_FOR_TEMPLATES sanitization bypass.

New

  • Added a console warning when USE_PROFILES is combined with ALLOWED_TAGS or ALLOWED_ATTR

In short

1 security1 new3 fixed4 internal

  • Security

    Fixed a SAFE_FOR_TEMPLATES bypass where the final scrub cut through tags and let a template expression form on reparse

Release note

  • Fixed a SAFE_FOR_TEMPLATES bypass where the final scrub cut through tags and let a template expression form on reparse, thanks @e1abrador

  • Fixed a direct property read in the clobbering check, thanks @trace37labs

  • Removed

    Removed several entries from the SVG tag allow-list that are attributes and not elements, thanks @hackvertor

  • Added a console warning when USE_PROFILES is combined with ALLOWED_TAGS or ALLOWED_ATTR, thanks @rugk

  • Refactored the code base: removed dead code and redundant helpers, shortened comments

  • Fixed a hook-widened allow-list carrying over when the config object received by a hook was passed back to sanitize()

  • Documented that the content of closed shadow roots cannot be sanitized (README and wiki)

  • Updated the README, the wiki and the list of contributors

  • Updated 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.