CVE-2026-0540

NameCVE-2026-0540
DescriptionDOMPurify 3.1.3 through 3.3.1 and 2.5.3 through 2.5.8, fixed in commit 729097f, contain a cross-site scripting vulnerability that allows attackers to bypass attribute sanitization by exploiting five missing rawtext elements (noscript, xmp, noembed, noframes, iframe) in the SAFE_FOR_XML regex. Attackers can include payloads like </noscript><img src=x onerror=alert(1)> in attribute values to execute JavaScript when sanitized output is placed inside these unprotected rawtext contexts.
SourceCVE (at NVD; CERT, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
node-dompurify (PTS)bookworm2.4.1+dfsg+~2.4.0-2+deb12u1vulnerable
bookworm (security)2.4.1+dfsg+~2.4.0-2vulnerable
forky, sid, trixie3.1.7+dfsg+~3.0.5-2vulnerable

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
node-dompurifysource(unstable)(unfixed)

Notes

Fixed by: https://github.com/cure53/DOMPurify/commit/729097f63a78e3e0e9f771e648f462bee100e78f

Search for package or bug name: Reporting problems