Categories
CVE-2026-47423 high CVSS 8.2

Cross-Site Scripting (XSS) in dompurify (CVE-2026-47423)

Summary

Cross-site scripting in dompurify (CVE-2026-47423). Confidential information can be exposed externally. Exploitable via selectedcontent. Mitigation: upgrade to 3.4.5 or later.

Original description

The description as published by the source.

Summary

DOMPurify 3.4.4 allows selectedcontent by default, allowing a chain in which browsers "re-clone" an XSS payload after sanitization, effectively bypassing DOMPurify.

Details

The chain is as follows:

  1. The browser parses the input and creates a clone from the selected
  2. DOMPurify walks and sanitizes that generated clone.
  3. DOMPurify reaches the original `` and removes selected=javascript:1
  4. The browser refreshes the `` clone from the original option's content.
  5. The refreshed clone is in a subtree DOMPurify already walked, which DOMPurify doesn't go back to sanitize
  6. The returned string contains unsanitized markup inside ``.

PoC

const dirty =
  '' +
  '' +
  'x' +
  '';

const clean = DOMPurify.sanitize(dirty);
console.log(clean);

document.body.innerHTML = clean;

Observed "sanitized" output in Chromium 148/WebKit 625:

xx

After reinsertion, the browser updates the live DOM and strips the handler from the displayed clone, but the onerror has already fired:

xx

Reproduced in Chromium and WebKit, but not Safari (not yet latest WebKit) or Firefox. Will likely change with browser support for selectedcontent.

Impact

This is a default-configuration DOMPurify sanitizer bypass resulting in XSS.

Applications are impacted if they sanitize attacker-controlled HTML with DOMPurify 3.4.4 using the string-input path and…

Source: GitHub Security Advisories (Global) NVD GitHub Advisory

Auto-generated summary

Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.

A vulnerability tracked as CVE-2026-47423 has been found in dompurify.
Attackers can target a specific entry point like selectedcontent over the network to misuse the product.
Confidential information can be exposed externally. CVSS score: 8.2/10.
What to do: upgrade dompurify to 3.4.5 or later.
If unsure, ask your IT team or search "dompurify CVE-2026-47423" on the vendor's site.

CVE-2026-47423 (dompurify) — CWE-79 / CVSS v3 8.2
Attack vector: remote (network-reachable) / unauthenticated
Attack surface: selectedcontent / option / onerror
Patched: 3.4.5 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.

❓ What is the problem

Cross-site scripting (XSS) (CWE-79) exists in dompurify. Attackers reach the vulnerable code path via selectedcontent without authentication.

📍 Affected scope

Check the vendor advisory for the affected versions of dompurify. Attack surface: selectedcontent / option / onerror.

🔥 Severity

Severity: High (CVSS 8.2/10). Confidential information can be exposed externally.

🔧 How to fix

Update to 3.4.5.

🛡️ Workaround

Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.

🔍 Detection

Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'dompurify' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.

Response actions

Concrete steps and command examples for SOC/SRE teams to execute in order

  1. 1
    Identify exposure identify
    grep -r 'dompurify' . | grep -v node_modules

    リポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で dompurify を grep し、稼働しているサービス・バージョンを把握する。

  2. 2
    Apply patch patch
    Upgrade dompurify to 3.4.5

    ステージング環境で 3.4.5 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。

  3. 3
    Post-deployment verification verify
    Confirm patched version is live in production

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。

Affected packages

npm dompurify
[{"type":"SEMVER","events":[{"introduced":"3.4.4"},{"fixed":"3.4.5"}]}]

Fix status by distribution

Fixed packages published by each distribution for this CVE

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details