CVE-2026-65912
JSON

5.1medium

DOMPurify before 3.3.2 URI Validation Bypass via ADD_ATTR

Severity
5.1medium CVSS:4.0 by VulnCheck
Exploit likelihood
0.18% (higher than 8% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
VulnCheck
Also known as
GHSA-cjmm-f4jc-qw8r

Description

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 combinations to bypass URI-safe validation, allowing unsafe protocols like javascript: to survive sanitization and execute as DOM-based XSS when the link is activated.

Affected

Product or packageVersionsReported by
cure53 DOMPurifybefore 3.3.2
Not affected: 3.3.2
CVE List, NVD
dompurify (npm)before 3.3.2GitHub Advisory Database

All scores

VulnCheck5.1medium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
VulnCheck6.1medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
GitHubmedium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N

Classification

CWE-79CWE-183

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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 combinations to bypass URI-safe validation, allowing unsafe protocols like javascript: to survive sanitization and execute as DOM-based XSS when the link is activated.

GitHub Advisory Database

Summary

DOMPurify allows ADD_ATTR to be provided as a predicate function via EXTRA_ELEMENT_HANDLING.attributeCheck. When the predicate returns true, _isValidAttribute short-circuits the attribute check before URI-safe validation runs. An attacker who supplies a predicate that accepts specific attribute/tag combinations can then sanitize input such as <a href="javascript:alert(document.domain)"> and have the javascript: URL survive, because URI validation is skipped for that attribute while other checks still pass. The provided PoC accepts href for anchors and then triggers a click inside an iframe, showing that the sanitized payload executes despite the protocol bypass.

Impact

Predicate-based allowlisting bypasses DOMPurify's URI validation, allowing unsafe protocols such as javascript: to reach the DOM and execute whenever the link is activated, resulting in DOM-based XSS.

Credits

Identified by Cantina’s Apex (https://www.cantina.security).

NVD (es)

DOMPurify anterior a la versión 3.3.2 contiene una vulnerabilidad de omisión de validación de URI cuando ADD_ATTR se proporciona como una función predicado a través de EXTRA_ELEMENT_HANDLING.attributeCheck. Los atacantes pueden proporcionar un predicado que acepta combinaciones específicas de atributos y etiquetas para omitir la validación de URI segura, permitiendo que protocolos inseguros como javascript_disabled: sobrevivan a la sanitización y se ejecuten como XSS basado en DOM cuando el enlace se activa.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-65912 changed 2026-07-23CVE Terms of Use
GitHub Advisory DatabaseGHSA-cjmm-f4jc-qw8r changed 2026-09-10CC-BY-4.0
NVDCVE-2026-65912 changed 2026-10-24Public domain