CVE-2026-65912
DOMPurify ADD_ATTR predicate skips URI validation
Description
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).
Affected Maven artifacts (2)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.mvnpm » dompurifyvia npm dompurify | < 3.3.2 | 3.3.2 |
| org.webjars.npm » dompurifyvia npm dompurify | < 3.3.2 | 3.3.2 |
Blast radius
33% of the dependent artifacts (17) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 164 |
| 2 hops | 532 |
| 3 hops | 429 |
| 4 hops | 130 |
| 5 hops | 120 |
Most used dependents
- org.mvnpm.at.bigbinary » neeto-commons-frontend14 usages
- org.webjars.npm » monaco-editor9 usages
- org.eclipse.dirigible » dirigible-components-ui-editor-monaco8 usages
- org.eclipse.dirigible » dirigible-components-ui-view-sql8 usages
- org.eclipse.dirigible » dirigible-components-group-ide7 usages
- org.mvnpm » monaco-editor7 usages
- org.mvnpm.at.bigbinary » neeto-atoms7 usages
- org.mvnpm.at.bigbinary » neeto-molecules6 usages
- org.mvnpm.at.bigbinary » neeto-filters-frontend6 usages
- org.mvnpm » mermaid5 usages
- org.mvnpm.at.lwrjs » core4 usages
- org.mvnpm.at.bigbinary » neeto-editor4 usages
- org.mvnpm.at.bigbinary » neeto-team-members-frontend4 usages
- org.mvnpm.at.bigbinary » neeto-image-uploader-frontend4 usages
- org.mvnpm.at.locker » html-sanitizer3 usages
Computed from the dependency graph of build 20261125.2201 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
Other ecosystems
Also affects npm (1 package) . See all on OSV
References
| Package | cure53/DOMPurify | github.com |
| Web | cure53/DOMPurify advisory GHSA-cjmm-f4jc-qw8r | github.com |
| Web | cure53/DOMPurify release 3.3.2 | github.com |
