Improper Initialization Affecting dompurify package, versions <3.4.11


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JS-DOMPURIFY-17375136
  • published18 Jun 2026
  • disclosed18 Jun 2026
  • credittrace37labs

Introduced: 18 Jun 2026

New CVE NOT AVAILABLE CWE-471  (opens in a new tab)
CWE-665  (opens in a new tab)

How to fix?

Upgrade dompurify to version 3.4.11 or higher.

Overview

dompurify is a DOM-only XSS sanitizer for HTML, MathML and SVG.

Affected versions of this package are vulnerable to Improper Initialization in the DOMPurify.setConfig() API when an uponSanitizeAttribute hook is registered that mutates allowedAttributes. An attacker can cause persistent modification of the attribute allowlist by submitting specially crafted content, resulting in unauthorized attributes being permitted in all subsequent sanitization calls.

CVSS Base Scores

version 4.0
version 3.1