npmWorst: Critical34 advisories
dompurify: known vulnerabilities
dompurify has 34 reviewed security advisories in the GitHub Advisory Database — 3 critical, 4 high, 20 moderate, 7 low. The most recent was published 2026-10-22. Each one below lists the affected version range, the release that fixes it, its CVE and severity. SkyShield matches these against the dompurify versions running across your servers, containers and images, and ranks what to patch first.
How to fix dompurify
Upgrade dompurify to a release at or above the fixed version shown for each advisory below. For npm:
npm install dompurify@3.4.17 (or run npm audit fix)
SkyShield checks the installed version on every machine and container, so you can see which hosts are still on an affected release after you roll the fix out.
Advisories (34)
DOMPurify: SMIL attributeName=href guard is skipped when PARSER_MEDIA_TYPE is application/xhtml+xml
Low CWE-79
— Affected: before 3.4.17. Fixed in 3.4.17. Published 2026-10-22. GHSA-c6gr-qvv4-5v3f · CVE-2026-116802
DOMPurify SAFE_FOR_TEMPLATES bypass: split template expressions survive in attached shadow root content on DOM output modes
Critical CWE-79
— Affected: from 3.4.4 up to 3.4.17. Fixed in 3.4.17. Published 2026-10-22. GHSA-cg2g-xh64-v4q7 · CVE-2026-116804
DOMPurify IN_PLACE: hook that removes a parent or sibling leaves the detached subtree's event handlers armed (incomplete fix for GHSA-p98j-92pf-mc4p)
High CWE-693 CWE-79
— Affected: before 3.4.17. Fixed in 3.4.17. Published 2026-10-22. GHSA-mrv2-3pqr-j5jr · CVE-2026-116803
DOMPurify: IN_PLACE returns a force-removed rawtext root whose text carries attacker markup — pure HTML reparse executes
Low CWE-79
— Affected: before 3.4.16. Fixed in 3.4.16. Published 2026-10-05. GHSA-6688-9rhm-gjv2 · CVE-2026-109345
DOMPurify: IN_PLACE: node-removing afterSanitize hook leaves detached subtree event handlers armed, causing DOM XSS
Low CWE-79
— Affected: from 3.4.13 up to 3.4.16. Fixed in 3.4.16. Published 2026-09-30. GHSA-p98j-92pf-mc4p · CVE-2026-109344
DOMPurify: IN_PLACE hook removal leaves a detached subtree executable, causing XSS
Moderate CWE-79
— Affected: before 3.4.13. Fixed in 3.4.13. Published 2026-08-07. GHSA-55q2-fjhq-7xh7 · CVE-2026-75838
Duplicate Advisory: DOMPurify: `CUSTOM_ELEMENT_HANDLING` bypasses `afterSanitizeElements` for allowed custom elements.
Moderate 6.1 CWE-79
— Affected: up to and including 3.4.11. No fixed release is listed. Published 2026-07-24. GHSA-jxrp-r7gx-q4j8
DOMPurify: `CUSTOM_ELEMENT_HANDLING` bypasses `afterSanitizeElements` for allowed custom elements.
Low CWE-184 CWE-693 CWE-79
— Affected: before 3.4.12. Fixed in 3.4.12. Published 2026-07-21. GHSA-c2j3-45gr-mqc4 · CVE-2026-66010
DOMPurify: Permanent `ALLOWED_ATTR` pollution via `setConfig()` bypassing the hook clone-guard (incomplete fix of the 3.4.7 hook-pollution patch)
Moderate CWE-471 CWE-665 CWE-79
— Affected: before 3.4.11. Fixed in 3.4.11. Published 2026-06-18. GHSA-cmwh-pvxp-8882 · CVE-2026-65898
DOMPurify: Hook mutation of `data.allowedTags` / `data.allowedAttributes` permanently pollutes `DEFAULT_ALLOWED_TAGS` / `DEFAULT_ALLOWED_ATTR`
Moderate 6.1 CWE-501 CWE-693
— Affected: before 3.4.7. Fixed in 3.4.7. Published 2026-06-15. GHSA-76mc-f452-cxcm · CVE-2026-65902
DOMPurify: SAFE_FOR_TEMPLATES bypass - template expressions survive sanitization inside <template> content when using DOM output modes
Low CWE-79
— Affected: from 3.0.0 up to 3.4.8. Fixed in 3.4.8. Published 2026-06-15. GHSA-gvmj-g25r-r7wr · CVE-2026-65900
DOMPurify: Cross-realm IN_PLACE sanitization leaves executable markup intact via realm-bound `instanceof` checks
Moderate 6.1 CWE-501 CWE-693 CWE-79
— Affected: before 3.4.6. Fixed in 3.4.6. Published 2026-06-15. GHSA-hpcv-96wg-7vj8 · CVE-2026-49458
DOMPurify: IN_PLACE mode preserves attributes of a clobbered root element, allowing XSS via attacker-controlled root DOM
Moderate 6.1 CWE-1321 CWE-693 CWE-79
— Affected: before 3.4.6. Fixed in 3.4.6. Published 2026-06-15. GHSA-r47g-fvhr-h676 · CVE-2026-49459
DOMPurify IN_PLACE Sanitization Bypass via Attached Shadow Root Inside <template>.content
Moderate CWE-79
— Affected: before 3.4.7. Fixed in 3.4.7. Published 2026-06-15. GHSA-rp9w-3fw7-7cwq · CVE-2026-49978
DOMPurify: Trusted Types policy survives `clearConfig()` and can poison later `RETURN_TRUSTED_TYPE` output
Low CWE-693
— Affected: before 3.4.9. Fixed in 3.4.9. Published 2026-06-15. GHSA-vxr8-fq34-vvx9 · CVE-2026-65899
DOMPurify: `IN_PLACE` mode trusts attacker-controlled `nodeName` on live non-form nodes, allowing script retention and XSS via attacker-supplied DOM objects
Low CWE-79
— Affected: up to and including 3.4.6. No fixed release is listed. Published 2026-06-15. GHSA-x4vx-rjvf-j5p4 · CVE-2026-65901
DOMPurify XSS via selectedcontent re-clone
High 8.2 CWE-79
— Affected: from 3.4.4 up to 3.4.5. Fixed in 3.4.5. Published 2026-06-01. GHSA-87xg-pxx2-7hvx · CVE-2026-47423
DOMPurify has a SAFE_FOR_TEMPLATES bypass in RETURN_DOM mode
Moderate 6.8 CWE-1289 CWE-79
— Affected: from 1.0.10 up to 3.4.0. Fixed in 3.4.0. Published 2026-04-23. GHSA-crv5-9vww-q3g8 · CVE-2026-41239
DOMPurify: FORBID_TAGS bypassed by function-based ADD_TAGS predicate (asymmetry with FORBID_ATTR fix)
Moderate CWE-183 CWE-79
— Affected: before 3.4.0. Fixed in 3.4.0. Published 2026-04-23. GHSA-h7mw-gpvr-xq4m · CVE-2026-41240
DOMPurify: Prototype Pollution to XSS Bypass via CUSTOM_ELEMENT_HANDLING Fallback
Moderate 6.9 CWE-1321 CWE-79
— Affected: from 3.0.1 up to 3.4.0. Fixed in 3.4.0. Published 2026-04-23. GHSA-v9jr-rg53-9pgp · CVE-2026-41238
DOMPurify's ADD_TAGS function form bypasses FORBID_TAGS due to short-circuit evaluation
Moderate CWE-783
— Affected: before 3.4.0. Fixed in 3.4.0. Published 2026-04-16. GHSA-39q2-94rc-95cp · CVE-2026-65903
DOMPurify USE_PROFILES prototype pollution allows event handlers
Moderate CWE-1321
— Affected: before 3.3.2. Fixed in 3.3.2. Published 2026-04-03. GHSA-cj63-jhhr-wcxv · CVE-2026-65913
DOMPurify ADD_ATTR predicate skips URI validation
Moderate CWE-183
— Affected: before 3.3.2. Fixed in 3.3.2. Published 2026-04-03. GHSA-cjmm-f4jc-qw8r · CVE-2026-65912
DOMPurify is vulnerable to mutation-XSS via Re-Contextualization
Moderate CWE-79
— Affected: before 3.3.2. Fixed in 3.3.2. Published 2026-03-27. GHSA-h8r8-wccr-v5f2 · CVE-2026-65914
DOMPurify contains a Cross-site Scripting vulnerability
Moderate 6.1 CWE-79
— Affected: from 2.5.3 up to 2.5.9. Fixed in 2.5.9. Published 2026-03-03. GHSA-v2wj-7wpq-c8vv · CVE-2026-0540
DOMPurify contains a Cross-site Scripting vulnerability
Moderate 6.1 CWE-79
— Affected: 2.5.3 through 2.5.8. No fixed release is listed. Published 2026-03-03. GHSA-v8jm-5vwx-cfxm · CVE-2025-15599
DOMPurify allows Cross-site Scripting (XSS)
Moderate 4.5 CWE-79
— Affected: before 3.2.4. Fixed in 3.2.4. Published 2025-02-14. GHSA-vhxf-7vqr-mrjg · CVE-2025-26791
DOMPurify vulnerable to tampering by prototype polution
Critical 9.1 CWE-1321
— Affected: before 2.4.2. Fixed in 2.4.2. Published 2024-10-31. GHSA-p3vf-v8qc-cwcr · CVE-2024-48910
DOMpurify has a nesting-based mXSS
High 10.0 CWE-79
— Affected: from 3.0.0 up to 3.1.3. Fixed in 3.1.3. Published 2024-10-11. GHSA-gx9m-whjm-85jf · CVE-2024-47875
DOMPurify allows tampering by prototype pollution
High 7.0 CWE-1321 CWE-1333
— Affected: from 3.0.0 up to 3.1.3. Fixed in 3.1.3. Published 2024-09-16. GHSA-mmhx-hmjr-r674 · CVE-2024-45801
DOMPurify Open Redirect vulnerability
Moderate 6.1 CWE-601
— Affected: before 1.0.11. Fixed in 1.0.11. Published 2023-11-07. GHSA-8hgg-xxm5-3873 · CVE-2019-25155
Cross-site Scripting in dompurify
Moderate 6.1 CWE-79
— Affected: before 2.0.17. Fixed in 2.0.17. Published 2020-10-07. GHSA-63q7-h895-m982 · CVE-2020-26870
Cross-Site Scripting in dompurify
Critical CWE-79
— Affected: before 2.0.7. Fixed in 2.0.7. Published 2020-09-03. GHSA-mjjq-c88q-qhr6
Cross-Site Scripting in dompurify
Moderate 6.1 CWE-79
— Affected: before 2.0.3. Fixed in 2.0.3. Published 2020-08-28. GHSA-chqj-j4fh-rw7m · CVE-2019-16728
Find dompurify across your fleet
Install one agent per server and connect your cloud. SkyShield matches your packages and images against GHSA,
CISA KEV and EPSS and shows the fix per machine. Free for one server, then from $49 per server a month.
Start free.