# CVE-2026-65898: cure53 DOMPurify allowlist pollution via setConfig

Source: https://junglewise.ai/threats/cve-2026-65898-cure53-dompurify-allowlist-pollution-via-setconfig  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-23. Updated: 2026-07-23  
License: CC BY 4.0 with a link back

CVE-2026-65898 · Severity: high · CVSS 7.2 · Published 2026-07-23

DOMPurify, a widely used library for cleaning HTML to prevent security attacks, contains a flaw in how it handles custom configuration settings. When specific security hooks are used alongside a persistent configuration, the library fails to properly isolate its internal list of allowed attributes. This allows an attacker to bypass security filters and execute malicious scripts (Cross-Site Scripting) in the browsers of other users, potentially leading to account takeover or data theft.

Technologies: [dompurify (npm)](https://junglewise.ai/threats/technologies/dompurify). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2026-65898 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-65898 being exploited in the wild.

**How severe is CVE-2026-65898?** High severity, with a CVSS score of 7.2, published 23 July 2026.

**Which products and versions are affected?** dompurify (npm) SEMVER:introduced=0,fixed=3.4.11.

**Is there a fix for CVE-2026-65898?** Yes. dompurify (npm): upgrade to 3.4.11 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-65898 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-65898?** Check whether you run dompurify (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- dompurify (npm): upgrade to 3.4.11 or later

  ```sh
  npm install dompurify@3.4.11
  ```


## Technical details

A vulnerability exists in DOMPurify where the 'clone-guard' intended to prevent hook-based allowlist pollution is bypassed when using the persistent configuration API (setConfig). The root cause is that setConfig() sets a internal flag that causes subsequent sanitize() calls to skip the _parseConfig function where the allowlist cloning logic resides. Consequently, if an 'uponSanitizeAttribute' hook conditionally allows a dangerous attribute (like 'onerror') for a specific element, that attribute is permanently added to the shared global allowlist for the lifetime of the DOMPurify instance. An attacker can exploit this by submitting content that triggers the hook's condition, followed by malicious content that leverages the now-polluted allowlist to achieve stored Cross-Site Scripting (XSS). This issue is fixed in version 3.4.11.

## Affected products

- cure53 DOMPurify < 3.4.11

## Identifiers

- CVE-2026-65898
- GHSA-cmwh-pvxp-8882

## Timeline

- 2026-06-17: advisory: GHSA-cmwh-pvxp-8882 published by cure53
- 2026-07-23: disclosed: NVD publication date

## References

- [https://github.com/cure53/DOMPurify/security/advisories/GHSA-cmwh-pvxp-8882](https://github.com/cure53/DOMPurify/security/advisories/GHSA-cmwh-pvxp-8882)
- [https://www.vulncheck.com/advisories/dompurify-before-permanent-attribute-allowlist-pollution-via-setconfig](https://www.vulncheck.com/advisories/dompurify-before-permanent-attribute-allowlist-pollution-via-setconfig)

## Related threats

- [DOMPurify SAFE_FOR_TEMPLATES bypass in shadow root content](https://junglewise.ai/threats/dompurify-safe-for-templates-bypass-split-template-expressions-survive-c23665cf)
- [DOMPurify IN_PLACE event handler bypass when hook removes parent or sibling](https://junglewise.ai/threats/dompurify-in-place-hook-that-removes-a-parent-or-sibling-leaves-the-3ea5d18f)
- [DOMPurify SMIL attributeName=href guard bypass in XHTML mode](https://junglewise.ai/threats/dompurify-smil-attributename-href-guard-is-skipped-when-parser-media-15a5efd2)
- [DOMPurify IN_PLACE mode XSS via rawtext element text content](https://junglewise.ai/threats/dompurify-in-place-returns-a-force-removed-rawtext-root-whose-text-16d9ac9e)
- [DOMPurify DOM XSS in IN_PLACE mode with afterSanitize hooks](https://junglewise.ai/threats/dompurify-in-place-node-removing-aftersanitize-hook-leaves-detached-3087e7fd)
