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:
- The browser parses the input and creates a
clone from the selected - DOMPurify walks and sanitizes that generated clone.
- DOMPurify reaches the original `` and removes
selected=javascript:1 - The browser refreshes the `` clone from the original
option's content. - The refreshed clone is in a subtree DOMPurify already walked, which DOMPurify doesn't go back to sanitize
- 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.
Cross-site scripting (XSS) (CWE-79) exists in dompurify. Attackers reach the vulnerable code path via selectedcontent without authentication.
Check the vendor advisory for the affected versions of dompurify. Attack surface: selectedcontent / option / onerror.
Severity: High (CVSS 8.2/10). Confidential information can be exposed externally.
Update to 3.4.5.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
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
-
1Identify exposure identify
grep -r 'dompurify' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
dompurifyを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade dompurify to 3.4.5ステージング環境で 3.4.5 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
Fix status by distribution
Fixed packages published by each distribution for this CVE
- Ubuntu UBUNTU-CVE-2026-47423 dompurify.js
References
- exploit github.com
- package github.com
- patch security-advisories@github.com
- web github.com
- web security-advisories@github.com