Description
DOMPurify is a DOM-only cross-site scripting sanitizer for HTML, MathML, and SVG. Prior to 3.4.6, DOMPurify.sanitize(node, { IN_PLACE: true }) accepted same-origin foreign-realm DOM nodes while follow-on checks used parent-realm constructors, causing instanceof checks for forms, named node maps, document fragments, and elements to fail and skip clobber, template-content, and shadow-DOM sanitization branches so executable markup could survive. This issue is fixed in version 3.4.6.
Published: 2026-07-14
Score: 6.1 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

DOMPurify is a DOM‑only cross‑site scripting sanitizer for HTML, MathML, and SVG. Prior to 3.4.6, DOMPurify.sanitize(node, { IN_PLACE: true }) accepted same‑origin foreign‑realm DOM nodes while follow‑on checks used parent‑realm constructors, causing instanceof checks for forms, named node maps, document fragments, and elements to fail and skip clobber, template‑content, and shadow‑DOM sanitization branches. The result is that executable markup could survive filtering and be executed, permitting client‑side script execution or UI manipulation. The issue is fixed in version 3.4.6, and the weakness is classified as CWE‑501, CWE‑693, and CWE‑79.

Affected Systems

The library cure53 DOMPurify prior to release 3.4.6 is affected. Any installation of DOMPurify version 3.4.5 or older, regardless of whether it is used in a server‑side rendering context or a client‑side web application, is vulnerable when the IN_PLACE option is enabled.

Risk and Exploitability

The CVSS score of 6.1 indicates moderate severity. The EPSS score of less than 1% suggests that, at present, the likelihood of exploitation is low. Because the vulnerability is not listed in the CISA KEV catalog, no known large‑scale exploitation campaigns have been documented. The likely attack vector is that an attacker injects crafted frontend content containing foreign‑realm DOM nodes into a page that uses DOMPurify.sanitize with IN_PLACE:true. If the content is processed by the library, the cross‑realm bias in instanceof checks enables the malicious markup to bypass sanitization and be executed in the victim’s context.

Generated by OpenCVE AI on July 31, 2026 at 05:09 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade to DOMPurify version 3.4.6 or later to eliminate the cross‑realm sanitization bypass (CWE‑501, CWE‑693, CWE‑79).
  • Avoid using the IN_PLACE option unless absolutely necessary; the default in‑place cleanup offers reduced risk of this flaw.
  • Review any custom sanitization pipelines that pass foreign‑realm DOM nodes and ensure they either do not enable IN_PLACE or are upgraded to version 3.4.6.

Generated by OpenCVE AI on July 31, 2026 at 05:09 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-hpcv-96wg-7vj8 DOMPurify: Cross-realm IN_PLACE sanitization leaves executable markup intact via realm-bound `instanceof` checks
History

Fri, 17 Jul 2026 05:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Wed, 15 Jul 2026 17:15:00 +0000

Type Values Removed Values Added
First Time appeared Cure53
Cure53 dompurify
Vendors & Products Cure53
Cure53 dompurify

Wed, 15 Jul 2026 12:15:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

threat_severity

Moderate


Tue, 14 Jul 2026 20:30:00 +0000

Type Values Removed Values Added
Description DOMPurify is a DOM-only cross-site scripting sanitizer for HTML, MathML, and SVG. Prior to 3.4.6, DOMPurify.sanitize(node, { IN_PLACE: true }) accepted same-origin foreign-realm DOM nodes while follow-on checks used parent-realm constructors, causing instanceof checks for forms, named node maps, document fragments, and elements to fail and skip clobber, template-content, and shadow-DOM sanitization branches so executable markup could survive. This issue is fixed in version 3.4.6.
Title DOMPurify: Cross-realm IN_PLACE sanitization leaves executable markup intact via realm-bound `instanceof` checks
Weaknesses CWE-501
CWE-693
CWE-79
References
Metrics cvssV3_1

{'score': 6.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N'}


Subscriptions

Cure53 Dompurify
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-15T13:03:02.384Z

Reserved: 2026-05-30T02:43:33.107Z

Link: CVE-2026-49458

cve-icon Vulnrichment

Updated: 2026-07-15T13:02:46.968Z

cve-icon NVD

No data.

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-07-14T19:58:50Z

Links: CVE-2026-49458 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-07-31T05:15:03Z

Weaknesses
  • CWE-501

    Trust Boundary Violation

  • CWE-693

    Protection Mechanism Failure

  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')