-
Notifications
You must be signed in to change notification settings - Fork 583
Expand file tree
/
Copy pathGHSA-cjmm-f4jc-qw8r.json
More file actions
62 lines (62 loc) · 2.31 KB
/
GHSA-cjmm-f4jc-qw8r.json
File metadata and controls
62 lines (62 loc) · 2.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
{
"schema_version": "1.4.0",
"id": "GHSA-cjmm-f4jc-qw8r",
"modified": "2026-04-03T03:46:08Z",
"published": "2026-04-03T03:46:07Z",
"aliases": [],
"summary": "DOMPurify ADD_ATTR predicate skips URI validation",
"details": "## Summary\nDOMPurify 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.\n\n## Impact\nPredicate-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.\n\n## Credits\nIdentified by Cantina’s Apex (https://www.cantina.security).",
"severity": [
{
"type": "CVSS_V4",
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N"
}
],
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "dompurify"
},
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "2.5.9, 3.3.2"
}
]
}
],
"database_specific": {
"last_known_affected_version_range": "<= 3.3.1"
}
}
],
"references": [
{
"type": "WEB",
"url": "https://github.com/cure53/DOMPurify/security/advisories/GHSA-cjmm-f4jc-qw8r"
},
{
"type": "PACKAGE",
"url": "https://github.com/cure53/DOMPurify"
},
{
"type": "WEB",
"url": "https://github.com/cure53/DOMPurify/releases/tag/3.3.2"
}
],
"database_specific": {
"cwe_ids": [
"CWE-183"
],
"severity": "MODERATE",
"github_reviewed": true,
"github_reviewed_at": "2026-04-03T03:46:07Z",
"nvd_published_at": null
}
}