SecurityContext

CVE-2026-65902: DOMPurify - Stored XSS

  • Cve: CVE-2026-65902
  • Name: DOMPurify - Stored XSS
  • Description: DOMPurify before 3.4.7 passes direct references to the module-level DEFAULT_ALLOWED_TAGS and DEFAULT_ALLOWED_ATTR sets to the uponSanitizeElement and uponSanitizeAttribute hooks via data.allowedTags / data.allowedAttributes when sanitize is called without an explicit cfg.ALLOWED_TAGS / cfg.ALLOWED_ATTR array. A hook that mutates these fields permanently widens the default allow-lists for the lifetime of the DOMPurify instance, so all subsequent default-config sanitize calls inherit the widened defaults and attacker payloads using the poisoned tag/attribute name survive sanitization. removeAllHooks(), clearConfig(), and passing a fresh cfg do not recover the state; only constructing a new DOMPurify instance does.
  • Impact: Attackers can bypass sanitization to execute malicious scripts, leading to cross-site scripting attacks.
  • Remediation: Update to version 3.4.7 or later.
  • Vulnerability type: stored_xss
  • Vulnerability impact: stored_xss
  • Requirements: Attacker must mutate sanitization hooks to widen allowed tags/attributes
  • Labels source: projectdiscovery
  • Severity: medium
  • Cvss score: 6.1
  • Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
  • Epss score: 0.00355
  • Epss percentile: 0.29841
  • Assignee: [email protected]
  • Published at: 2026-07-23T14:18:05Z
  • Age in days: 124
  • Modified at: 2026-10-29T21:17:29Z
  • Patch available: yes
  • Public exploits total: 1
  • References total: 3
  • Products total: 1
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2026-65902
  • Nvd status: modified
  • Checked, none or zero: known exploited entries, nuclei templates, public exploits capped, rejected by nvd
  • Not known: requirement type, hackerone

Cwe

IdName
CWE-501Trust Boundary Violation

Public exploits

UrlSourceAdded date
https://github.com/cure53/DOMPurify/security/advisories/GHSA-76mc-f452-cxcmnvd2026-07-23

References

Same in every row:

  • Source: nvd
UrlTags
https://github.com/cure53/DOMPurify/commit/7996f1dc78eb8b7922388aed75d94a9f8fad9a36Patch
https://github.com/cure53/DOMPurify/security/advisories/GHSA-76mc-f452-cxcmExploit, Third Party Advisory
https://www.vulncheck.com/advisories/dompurify-before-hook-mutation-pollution-via-allowedtagsThird Party Advisory

Products

ProductAffectedPlatform boundSourcesUrl
cure53:dompurify< 3.4.7nonvd/v1/products/cure53/dompurify

Projects

RepositoryLink kindsIndexedUrl
cure53/dompurifycommit, package, security_advisoryyes/v1/repositories/cure53/dompurify

Index

  • Repositories: 1022
  • Repositories high signal: 747
  • Packages: 1

Exploitation

  • Public exploit: yes
  • Public exploit count: 1
  • Public exploit first date: 2026-07-23
  • Remote: yes
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, initial access, authentication required
  • Not known: known exploited since, vulncheck known exploited since, nuclei template, initial access since, hackerone reports, exposed hosts