5.1medium
DOMPurify before 3.3.2 Prototype Pollution via USE_PROFILES
- Severity
- 5.1medium CVSS:4.0 by VulnCheck
- Exploit likelihood
- 0.19% (higher than 9% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- VulnCheck
- Also known as
- GHSA-cj63-jhhr-wcxv
Description
DOMPurify before 3.3.2 contains a prototype pollution vulnerability in USE_PROFILES mode that allows attackers to bypass attribute filtering by polluting Array.prototype properties. Attackers can set Array.prototype properties like onclick to true, causing DOMPurify to accept event handlers as allowlisted attributes and resulting in DOM-based XSS when sanitized markup is rendered.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| cure53 DOMPurify | before 3.3.2 Not affected: 3.3.2 | CVE List, NVD |
| dompurify (npm) | before 3.3.2 | GitHub Advisory Database |
All scores
| VulnCheck | 5.1medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N |
| VulnCheck | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| GitHub | medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:N/SC:L/SI:L/SA:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
DOMPurify before 3.3.2 contains a prototype pollution vulnerability in USE_PROFILES mode that allows attackers to bypass attribute filtering by polluting Array.prototype properties. Attackers can set Array.prototype properties like onclick to true, causing DOMPurify to accept event handlers as allowlisted attributes and resulting in DOM-based XSS when sanitized markup is rendered.
GitHub Advisory Database
Summary
When USE_PROFILES is enabled, DOMPurify rebuilds ALLOWED_ATTR as a plain array before populating it with the requested allowlists. Because the sanitizer still looks up attributes via ALLOWED_ATTR[lcName], any Array.prototype property that is polluted also counts as an allowlisted attribute. An attacker who can set Array.prototype.onclick = true (or a runtime already subject to prototype pollution) can thus force DOMPurify to keep event handlers such as onclick even when they are normally forbidden. The provided PoC sanitizes <img onclick=...> with USE_PROFILES and adds the sanitized output to the DOM; the polluted prototype allows the event handler to survive and execute, turning what should be a blocklist into a silent XSS vector.
Impact
Prototype pollution makes DOMPurify accept dangerous event handler attributes, which bypasses the sanitizer and results in DOM-based XSS once the sanitized markup is rendered.
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 contaminación de prototipos en modo USE_PROFILES que permite a los atacantes eludir el filtrado de atributos al contaminar las propiedades de Array.prototype. Los atacantes pueden establecer propiedades de Array.prototype como onclick a verdadero, lo que hace que DOMPurify acepte manejadores de eventos como atributos permitidos y resultando en XSS basado en DOM cuando el marcado saneado es renderizado.
References
| https://github.com/cure53/DOMPurify/security/advisories/GHSA-cj63-jhhr-wcxv | third-party-advisory, vendor-advisory, web | |
| https://www.vulncheck.com/advisories/dompurify-before-prototype-pollution-via-use-profiles | third-party-advisory | |
| https://github.com/cure53/DOMPurify | package | |
| https://github.com/cure53/DOMPurify/releases/tag/3.3.2 | web | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-65913 changed 2026-10-08 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-cj63-jhhr-wcxv changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2026-65913 changed 2026-10-24 | Public domain |