REDHAT-BUG-2506428: Medium severity npm/dompurify vulnerability

Published Jul 23, 2026
·
Updated

DOMPurify 3.0.0 before 3.4.9 does not reset the retained Trusted Types policy when clearConfig() is called, so a DOMPurify instance reused across trust boundaries stays bound to a previously supplied TRUSTEDTYPESPOLICY. A later caller that requests RETURNTRUSTEDTYPE output receives a TrustedHTML object created by the old (potentially unsafe) policy rather than a clean default, which can lead to script execution at a Trusted Types sink. Passing TRUSTEDTYPESPOLICY: null on the later call also does not clear the retained policy.

Affected Software

1 affected component
npm/dompurify>=3.0.0<3.4.9

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade DOMPurify to a version that resolves this vulnerability.

    Fixed in 3.4.9

Event History

Jul 23, 2026
Data Sourced
via Red Hat·02:01 PM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

Which deployments are realistically exposed?

Deployments using DOMPurify versions 3.0.0 through before 3.4.9 are exposed when the same DOMPurify instance is reused across trust boundaries and a prior caller has supplied a TRUSTED_TYPES_POLICY.

2

What conditions are required for exploitation?

A later caller must request RETURN_TRUSTED_TYPE output from the reused instance. The retained earlier policy must be potentially unsafe, allowing the later caller to receive TrustedHTML created under that policy for use at a Trusted Types sink.

3

Does calling clearConfig() or setting TRUSTED_TYPES_POLICY to null remove the risk?

No. In affected versions, clearConfig() does not reset the retained Trusted Types policy, and passing TRUSTED_TYPES_POLICY: null on a later call also does not clear it.

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