CVE-2026-109344

DOMPurify from 3.4.13 before 3.4.16 DOM XSS via IN_PLACE afterSanitize Hooks

Published Oct 12, 2026 CVSS 4.0 · 5.1 Medium EPSS < 1% KEV · Not listed
Description
DOMPurify from 3.4.13 before 3.4.16 contains a cross-site scripting vulnerability because IN_PLACE mode fails to neutralize subtrees detached by afterSanitizeElements or afterSanitizeAttributes hooks. Attackers can supply markup with on* handlers inside a wrapper removed by such hooks, leaving handlers armed on the live DOM to execute script in the victim origin.

Analysis

AI-generated

Technical impact

DOMPurify libraries between versions 3.4.13 and 3.4.15 fail to neutralize subtrees removed by afterSanitizeElements or afterSanitizeAttributes hooks during IN_PLACE sanitization. The flaw allows attackers to embed on* event handlers inside markup that is subsequently wrapped and removed by these hooks, leaving the event handlers attached to the live DOM. When the sanitized content is then inserted into a page, the retained handlers can execute arbitrary JavaScript in the victim’s browser context, enabling remote code execution within the originating domain.

Affected Systems

Products from cure53 using the DOMPurify library, specifically library versions 3.4.13, 3.4.14, and 3.4.15, are affected. The vulnerability is confined to the IN_PLACE sanitization mode and applies to any deployment that relies on custom afterSanitizeElements or afterSanitizeAttributes hooks.

Risk and Exploitability

CVSS base score is 5.1, indicating moderate severity, and no EPSS score is available. The vulnerability is not listed in the CISA KEV catalog. The attack requires an attacker to supply malicious markup that is processed through DOMPurify in IN_PLACE mode, where custom hooks detach marked‑up subtrees. An attacker who can influence the content passed to the sanitizer—such as a web application that accepts user‑generated content—can trigger the XSS. The exploit path is client‑side, so the impact is limited to browsers that load the vulnerable library, but any user rendering the content risks running attacker code. Given the moderate CVSS, potential for exploitation is considered low to moderate, yet the impact can be significant if an application places the library in a public‑facing context.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade DOMPurify to 3.4.16 or later
  • Remove or disable afterSanitizeElements and afterSanitizeAttributes hooks that detach elements before final sanitization
  • Avoid using the IN_PLACE mode; switch to the standard sanitize mode or enforce CSP headers

Generated by OpenCVE AI on October 12, 2026 at 18:30 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description DOMPurify from 3.4.13 before 3.4.16 contains a cross-site scripting vulnerability because IN_PLACE mode fails to neutralize subtrees detached by afterSanitizeElements or afterSanitizeAttributes hooks. Attackers can supply markup with on* handlers inside a wrapper removed by such hooks, leaving handlers armed on the live DOM to execute script in the victim origin.
Title DOMPurify from 3.4.13 before 3.4.16 DOM XSS via IN_PLACE afterSanitize Hooks
First Time appeared Cure53
Cure53 dompurify
Weaknesses CWE-79
CPEs cpe:2.3:a:cure53:dompurify:*:*:*:*:*:*:*:*
Vendors & Products Cure53
Cure53 dompurify
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'}

cvssV4_0

{'score': 5.1, 'vector': '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'}

Weaknesses
  • CWE-79

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

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Oct 13, 2026, 4:53 PM
Reserved
Oct 12, 2026, 2:19 PM
Status
Awaiting Analysis
Published
Oct 12, 2026, 5:17 PM
Modified
Oct 16, 2026, 5:27 PM
Severity
Moderate
Public date
Oct 12, 2026, 4:05 PM