Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. dompurify
  4. ›
  5. GHSA-cj63-jhhr-wcxv

GHSA-cj63-jhhr-wcxv: DOMPurify USE_PROFILES prototype pollution allows event handlers

April 3, 2026 (updated July 23, 2026)

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.

References

  • github.com/advisories/GHSA-cj63-jhhr-wcxv
  • github.com/cure53/DOMPurify/releases/tag/3.3.2
  • github.com/cure53/DOMPurify/security/advisories/GHSA-cj63-jhhr-wcxv
  • nvd.nist.gov/vuln/detail/CVE-2026-65913

Code Behaviors & Features

Detect and mitigate GHSA-cj63-jhhr-wcxv with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 3.3.2

Fixed versions

  • 3.3.2

Solution

Upgrade to version 3.3.2 or above.

Impact 6.1 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')

Source file

npm/dompurify/GHSA-cj63-jhhr-wcxv.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:16:10 +0000.