dompurify
npm27 known CVEs affecting this package
Aggregated from OSV, GitHub Security Advisories, NVD, and vendor advisories. Each CVE links to its full detail page with vendor advisories, patches, fixed versions, and remediation guidance.
CVEs affecting dompurifypage 1 of 1
- CVE-2019-16728MEDIUMCVSS 6.1EG 6.1✓ Fixed in 2.0.32019-09-24
DOMPurify before 2.0.1 allows XSS because of innerHTML mutation XSS (mXSS) for an SVG element or a MATH element, as demonstrated by Chrome and Safari.
- CVE-2019-25155MEDIUMCVSS 6.1EG 6.1✓ Fixed in 1.0.112023-11-07
DOMPurify before 1.0.11 allows reverse tabnabbing in demos/hooks-target-blank-demo.html because links lack a 'rel="noopener noreferrer"' attribute.
- CVE-2020-26870MEDIUMCVSS 6.1EG 6.1✓ Fixed in 2.0.172020-10-07
Cure53 DOMPurify before 2.0.17 allows mutation XSS. This occurs because a serialize-parse roundtrip does not necessarily return the original DOM tree, and a namespace can change from HTML to MathML, as demonstrated by nesting of FORM eleme…
- CVE-2024-45801HIGHCVSS 7.3EG 7.3✓ Fixed in 3.1.32024-09-16
DOMPurify is a DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, MathML and SVG. It has been discovered that malicious HTML using special nesting techniques can bypass the depth checking added to DOMPurify in recent releases. It …
- CVE-2024-47875CRITICALCVSS 10.0EG 10.0✓ Fixed in 3.1.32024-10-11
DOMPurify is a DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, MathML and SVG. DOMpurify was vulnerable to nesting-based mXSS. This vulnerability is fixed in 2.5.0 and 3.1.3.
- CVE-2024-48910CRITICALCVSS 9.1EG 9.1✓ Fixed in 2.4.22024-10-31
DOMPurify is a DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, MathML and SVG. DOMPurify was vulnerable to prototype pollution. This vulnerability is fixed in 2.4.2.
- CVE-2025-15599MEDIUMCVSS 6.1EG 6.1✓ Fixed in 3.2.72026-03-03
DOMPurify 3.1.3 through 3.2.6 and 2.5.3 through 2.5.8 contain a cross-site scripting vulnerability that allows attackers to bypass attribute sanitization by exploiting missing textarea rawtext element validation in the SAFE_FOR_XML regex. …
- CVE-2025-26791MEDIUMCVSS 4.5EG 4.5✓ Fixed in 3.2.42025-02-14
DOMPurify before 3.2.4 has an incorrect template literal regular expression, sometimes leading to mutation cross-site scripting (mXSS).
- CVE-2026-0540MEDIUMCVSS 6.1EG 6.1✓ Fixed in 2.5.92026-03-03
DOMPurify 3.1.3 through 3.3.1 and 2.5.3 through 2.5.8, fixed in commit 2726c74, contain a cross-site scripting vulnerability that allows attackers to bypass attribute sanitization by exploiting five missing rawtext elements (noscript, xmp,…
- CVE-2026-41238MEDIUMCVSS 6.9EG 6.9✓ Fixed in 3.4.02026-04-23
DOMPurify is a DOM-only cross-site scripting sanitizer for HTML, MathML, and SVG. Versions 3.0.1 through 3.3.3 are vulnerable to a prototype pollution-based XSS bypass. When an application uses `DOMPurify.sanitize()` with the default confi…
- CVE-2026-41239MEDIUMCVSS 6.8EG 6.8✓ Fixed in 3.4.02026-04-23
DOMPurify is a DOM-only cross-site scripting sanitizer for HTML, MathML, and SVG. Starting in version 1.0.10 and prior to version 3.4.0, `SAFE_FOR_TEMPLATES` strips `{{...}}` expressions from untrusted HTML. This works in string mode but n…
- CVE-2026-41240MEDIUMCVSS 6.1EG 6.1✓ Fixed in 3.4.02026-04-23
DOMPurify is a DOM-only cross-site scripting sanitizer for HTML, MathML, and SVG. Versions prior to 3.4.0 have an inconsistency between FORBID_TAGS and FORBID_ATTR handling when function-based ADD_TAGS is used. Commit c361baa added an earl…
- CVE-2026-47423HIGHCVSS 8.2EG 8.2✓ Fixed in 3.4.52026-06-01
vulnerable: 3.4.4
DOMPurify is a DOM-only cross-site scripting sanitizer for HTML, MathML, and SVG. In 3.4.4, DOMPurify allowed selectedcontent by default, allowing browsers to re-clone an XSS payload after sanitization so that unsanitized markup inside <se…
- CVE-2026-49458MEDIUMCVSS 6.1EG 6.1✓ Fixed in 3.4.62026-06-15
DOMPurify is a DOM-only cross-site scripting sanitizer for HTML, MathML, and SVG. Prior to 3.4.6, DOMPurify.sanitize(node, { IN_PLACE: true }) accepted same-origin foreign-realm DOM nodes while follow-on checks used parent-realm constructo…
- CVE-2026-49459MEDIUMCVSS 6.1EG 6.1✓ Fixed in 3.4.62026-06-15
DOMPurify is a DOM-only cross-site scripting sanitizer for HTML, MathML, and SVG. Prior to 3.4.6, DOMPurify.sanitize(root, { IN_PLACE: true }) could preserve event-handler attributes on an attacker-controlled <form> root when a descendant …
- CVE-2026-49978MEDIUMCVSS 6.1EG 6.1✓ Fixed in 3.4.72026-06-15
DOMPurify is a DOM-only cross-site scripting sanitizer for HTML, MathML, and SVG. Prior to 3.4.7, DOMPurify IN_PLACE sanitization could skip shadow contents attached to an element inside <template>.content, allowing attacker-controlled mar…
- CVE-2026-65898HIGHCVSS 7.2EG 7.2✓ Fixed in 3.4.112026-07-23
DOMPurify before 3.4.11 fails to clone the ALLOWED_ATTR allowlist when setConfig() is used with an uponSanitizeAttribute hook, allowing the hook to permanently mutate the shared allowlist. Attackers can register a hook that conditionally a…
- CVE-2026-65899MEDIUMCVSS 6.1EG 6.1✓ Fixed in 3.4.92026-07-23
DOMPurify 3.0.0 before 3.4.9 does not reset the retained Trusted Types policy when clearConfig() is called, so a DOMPurify instance reused across trust boundaries stays bound to a previously supplied TRUSTED_TYPES_POLICY. A later caller th…
- CVE-2026-65900MEDIUMCVSS 6.1EG 6.1✓ Fixed in 3.4.82026-07-23
DOMPurify versions >=3.0.0 and before 3.4.8, when configured with SAFE_FOR_TEMPLATES together with a DOM output mode (RETURN_DOM, RETURN_DOM_FRAGMENT, or IN_PLACE), fail to strip template expressions (e.g. ${evil}, {{evil}}, <%evil%>) insi…
- CVE-2026-65901MEDIUMCVSS 6.1EG 6.12026-07-23
DOMPurify through 3.4.6 contains a cross-site scripting vulnerability in IN_PLACE mode that trusts attacker-controlled nodeName on live non-form nodes. Attackers can supply hostile live DOM objects with real script children whose observabl…
- CVE-2026-65902MEDIUMCVSS 6.1EG 6.1✓ Fixed in 3.4.72026-07-23
DOMPurify before 3.4.7 (affected versions <= 3.4.5) passes direct references to the module-level DEFAULT_ALLOWED_TAGS and DEFAULT_ALLOWED_ATTR sets to the uponSanitizeElement and uponSanitizeAttribute hooks via data.allowedTags / data.allo…
- CVE-2026-65903MEDIUMCVSS 6.1EG 6.1✓ Fixed in 3.4.02026-07-23
DOMPurify before 3.4.0 contains a logic error in the ADD_TAGS function where short-circuit evaluation allows forbidden tags to bypass FORBID_TAGS restrictions. Attackers can craft input containing tags listed in FORBID_TAGS that are also a…
- CVE-2026-65912MEDIUMCVSS 6.1EG 6.1✓ Fixed in 3.3.22026-07-23
DOMPurify before 3.3.2 contains a URI validation bypass vulnerability when ADD_ATTR is provided as a predicate function via EXTRA_ELEMENT_HANDLING.attributeCheck. Attackers can supply a predicate that accepts specific attribute and tag com…
- CVE-2026-65913MEDIUMCVSS 6.1EG 6.1✓ Fixed in 3.3.22026-07-23
DOMPurify before 3.3.2 contains a prototype pollution vulnerability in USE_PROFILES mode that allows attackers to bypass attribute filtering by polluting Array.prototype properties. Attackers can set Array.prototype properties like onclick…
- CVE-2026-65914MEDIUMCVSS 6.1EG 6.1✓ Fixed in 3.3.22026-07-23
DOMPurify before 3.3.2 contains a mutation-XSS vulnerability when sanitized HTML is reinserted into special parsing contexts using innerHTML with wrappers like script, xmp, iframe, noembed, noframes, or noscript. Attackers can craft payloa…
- CVE-2026-66010MEDIUMCVSS 6.1EG 6.1✓ Fixed in 3.4.122026-07-24
DOMPurify before 3.4.12 fails to execute afterSanitizeElements hook for custom elements allowed via CUSTOM_ELEMENT_HANDLING.tagNameCheck, allowing attributes to bypass application security policies. Attackers can preserve sensitive attribu…
- CVE-2026-75838MEDIUMCVSS 5.1EG 5.1✓ Fixed in 3.4.132026-08-18
DOMPurify before 3.4.13 contains a cross-site scripting vulnerability in IN_PLACE sanitization where element-removal hooks fail to neutralize detached subtrees. Attackers can supply HTML with event handlers on descendant elements that exec…
Check whether dompurify is used in your infrastructure
EchelonGraph scans your cloud and SBOMs to map every package to your actual deployments. See blast radius for dompurify CVEs against the assets you own.
Start Free Scan →