CVE-2026-65912
mediumpriority · track · 0EPSS 0.003 · 23 %ileEUUSEPSS · scored 2026-10-27
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.
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode⚠ sources disagree · low–medium · 1.2–6.1
ssvc
A stakeholder decision — act, attend, or track — from exploitation and impact.
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (3)
Products and version ranges known to be affected.
advisories (1)
Vendor and ecosystem advisories describing this.
- GHSA-cjmm-f4jc-qw8rDOMPurify ADD_ATTR predicate skips URI validation2026-04-03ghsa · osvUS
## 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).
also known as (2)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (6)
External citations — patches, advisories, analysis.
- https://github.com/cure53/DOMPurify/security/advisories/GHSA-cjmm-f4jc-qw8rcnnvd
- https://www.vulncheck.com/advisories/dompurify-before-uri-validation-bypass-via-add-attrcnnvd
- https://github.com/cure53/DOMPurify/security/advisories/GHSA-cjmm-f4jc-qw8renisa_euvd
- https://www.vulncheck.com/advisories/dompurify-before-uri-validation-bypass-via-add-attrenisa_euvd
- https://github.com/cure53/DOMPurify/security/advisories/GHSA-cjmm-f4jc-qw8rThird Party Advisorynvd
- https://www.vulncheck.com/advisories/dompurify-before-uri-validation-bypass-via-add-attrThird Party Advisorynvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan