CVE-2026-47423: DOMPurify XSS via `selectedcontent` re-clone

Published Jun 1, 2026
·
Updated

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 <selectedcontent> clone from the selected <option> 2. DOMPurify walks and sanitizes that generated clone. 3. DOMPurify reaches the original <option> and removes selected=javascript:1 4. The browser refreshes the <selectedcontent> 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 <selectedcontent>.

PoC js const dirty = '<select><button><selectedcontent></selectedcontent></button>' + '<option selected=javascript:1>' + '<img src=x onerror=alert(1)>x' + '</option></select>';

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

document.body.innerHTML = clean;

Observed "sanitized" output in Chromium 148/WebKit 625: html <select><button><selectedcontent><img src="x" onerror="alert(1)">x</selectedcontent></button><option><img src="x">x</option></select>

After reinsertion, the browser updates the live DOM and strips the handler from the displayed clone, but the onerror has already fired: html <select><button><selectedcontent><img src="x">x</selectedcontent></button><option><img src="x">x</option></select>

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 then insert the returned string into the page, for example with innerHTML.

Other sources

DOMPurify is a DOM-only cross-site scripting sanitizer for HTML, MathML, and SVG. In 3.4.4, DOMPurify allowed selectedcontent by default, allowing browsers to re-clone an XSS payload after sanitization so that unsanitized markup inside <selectedcontent> is returned. This issue is fixed in version 3.4.5.

MITRE

Affected Software

2 affected componentsFixes available
npm/dompurify=3.4.4
3.4.5
Cure53 DOMPurify=3.4.4

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/dompurify to a version that resolves this vulnerability.

    Fixed in 3.4.5
  2. Upgrade

    Upgrade DOMPurify to a version that resolves this vulnerability.

    Fixed in 3.4.5
  3. Configuration

    Upgrade to DOMPurify 3.4.5 to fix the default-configuration bypass involving `selectedcontent`; in the interim, avoid relying on DOMPurify defaults that allowed `selectedcontent` in 3.4.4 when sanitizing attacker-controlled HTML before reinserting into the page.

    DOMPurify selectedcontent (allowed by default) = disabled

Event History

Jun 1, 2026
Advisory Published
via GitHub·02:07 PM
Data Sourced
via GitHub·02:07 PM
DescriptionSeverityWeaknessAffected Software
Jul 14, 2026
CVE Published
via MITRE·07:56 PM
Data Sourced
via MITRE·07:56 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·08:17 PM
RemedyDescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-47423?

CVE-2026-47423 has a severity rating of 8.2, which is categorized as high.

2

How do I fix CVE-2026-47423?

To mitigate CVE-2026-47423, you should upgrade to DOMPurify version 3.4.5 or later.

3

What type of vulnerability is CVE-2026-47423?

CVE-2026-47423 is classified as an XSS (Cross-Site Scripting) vulnerability.

4

What are the potential impacts of CVE-2026-47423?

CVE-2026-47423 can allow attackers to bypass sanitization, leading to possible XSS attacks.

5

Is CVE-2026-47423 present by default in DOMPurify?

Yes, CVE-2026-47423 is present by default in DOMPurify version 3.4.4.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203