CVE-2026-65898

DOMPurify before 3.4.11 Permanent Attribute Allowlist Pollution via setConfig

Published Jul 23, 2026 CVSS 4.0 · 5.1 Medium EPSS < 1% KEV · Not listed
Description
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 allows dangerous attributes like onerror for trusted elements, then submit untrusted content that inherits the polluted allowlist and executes event handlers as stored XSS.

Analysis

AI-generated

Technical impact

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 allows dangerous attributes such as onerror for trusted elements, then submit untrusted content that inherits the polluted allowlist and executes event handlers as stored XSS.

Affected Systems

The vulnerability affects the cure53 DOMPurify library in all versions prior to 3.4.11. Projects that incorporate DOMPurify and use setConfig with an uponSanitizeAttribute hook are at risk. The shared allowlist is shared across instances so any mutation persists for all subsequent sanitizations.

Risk and Exploitability

The CVSS score is 5.1, indicating moderate severity, while the EPSS score is less than 1%, suggesting a low probability of exploitation in the data set. It is not listed in the CISA KEV catalog. The likely attack vector involves a web application that sanitizes untrusted content with DOMPurify and allows custom configuration hooks; an attacker can persistently add malicious attributes, resulting in stored XSS after page rendering.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade DOMPurify to version 3.4.11 or later to receive the fixed allowlist cloning behavior.
  • Avoid using setConfig with an uponSanitizeAttribute hook if an upgrade is not possible; remove or neutralize any custom hooks that modify the allowlist.
  • Ensure that the application removes or sanitizes dangerous attributes such as onerror from content before it reaches DOMPurify, and apply a content security policy to mitigate XSS impact.

Generated by OpenCVE AI on August 3, 2026 at 21:33 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-cmwh-pvxp-8882 DOMPurify: Permanent `ALLOWED_ATTR` pollution via `setConfig()` bypassing the hook clone-guard (incomplete fix of the 3.4.7 hook-pollution patch)
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description 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 allows dangerous attributes like onerror for trusted elements, then submit untrusted content that inherits the polluted allowlist and executes event handlers as stored XSS.
Title DOMPurify before 3.4.11 Permanent Attribute Allowlist Pollution via setConfig
First Time appeared Cure53
Cure53 dompurify
Weaknesses CWE-79
CPEs cpe:2.3:a:cure53:dompurify:*:*:*:*:*:*:*:*
Vendors & Products Cure53
Cure53 dompurify
References
Metrics cvssV3_1

{'score': 7.2, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N'}

cvssV4_0

{'score': 5.1, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N'}

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Jul 23, 2026, 3:47 PM
Reserved
Jul 23, 2026, 11:03 AM
Status
Analyzed
Published
Jul 23, 2026, 2:18 PM
Modified
Oct 24, 2026, 1:10 PM