Skip to content

← Actionable
Low, CVSS 2.3amended

DOMPurify: IN_PLACE: node-removing afterSanitize hook leaves detached subtree event handlers armed, causing DOM XSS

CVE-2026-109344GHSA-p98j-92pf-mc4p

What to do

Vendor fix available. Upgrade each affected package to the fixed version on its release line (dompurify 3.4.16), redeploy, then verify what is actually installed.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

  • npm dompurify

    Affected
    >= 3.4.13, <= 3.4.15
    Fixed in
    3.4.16

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS 4.0
2.3 · CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N · score source
EPSS
  • CVE-2026-109344: 0.19% estimated exploitation activity in the next 30 days; percentile 8.52 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description

As published by the source; long descriptions are shortened.

Summary In INPLACE mode DOMPurify sanitizes the caller's live DOM subtree directly. To close a known hazard (GHSA-55q2-fjhq-7xh7), the library neutralizes any node a hook detaches during sanitization by stripping its subtree's non-allow-listed attributes, but this neutralization is wired only into the beforeSanitizeElements and uponSanitizeElement hook sites. An afterSanitizeElements or afterSanitizeAttributes hook that removes a non-root element (a documented, supported pattern) detaches that element's subtree with no neutralization, so descendant on handlers remain armed on the caller's live tree after sanitize() returns, yielding DOM XSS. No special privilege is required beyond supplying markup to an application that uses INPLACE together with a node-removing afterSanitize hook. Root Cause INPLACE sanitization mutates the caller's live document, so any element a hook detaches from that tree must have its subtree neutralized before sanitize() returns; otherwise a queued…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 4 · amended ·

    Amended from ghsa record GHSA-p98j-92pf-mc4p

  2. Revision 3 · amended ·

    Reviewed OSV alias/range/CVSS4 correction; package source scopes and original publication preserved. No customer finding resolved.

  3. Revision 2 · amended ·

    Amended from osv record GHSA-p98j-92pf-mc4p

  4. Revision 1 · created ·

    Published from ghsa record GHSA-p98j-92pf-mc4p

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2026-109344

Advisory: DOMPurify: IN_PLACE: node-removing afterSanitize hook leaves detached subtree event handlers armed, causing DOM XSS
IDs: CVE-2026-109344, GHSA-p98j-92pf-mc4p
Record: https://patchnext.com/advisories/ghsa-p98j-92pf-mc4p (revision 4, source checked 26 Oct 2026, 13:06 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: Low (CVSS 2.3)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor fix available; fixed versions by package: dompurify 3.4.16. A vendor fix does not mean a deployment is fixed.

## Affected components
- npm dompurify: affected >= 3.4.13, <= 3.4.15; fixed in 3.4.16

## Suggested inspection (read-only)
- `npm ls dompurify --all`: lists every installed copy and version, including transitive ones. Run in the project root after `npm ci`.

## Supported action
Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on dompurify.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://github.com/advisories/GHSA-p98j-92pf-mc4p (GitHub-reviewed advisory GHSA-p98j-92pf-mc4p lists affected ranges: npm dompurify >=3.4.13 <=3.4.15)
- Verified: https://osv.dev/vulnerability/GHSA-p98j-92pf-mc4p (OSV record GHSA-p98j-92pf-mc4p lists affected ranges: npm dompurify >=3.4.13 <3.4.16 (fixed))

Commands are suggestions: review each one before running it.

Loading voting…