CVE-2026-0540

MEDIUM

DOMPurify 2.5.3-2.5.8/3.1.3-3.3.1 - XSS

Title source: llm
STIX 2.1

Description

DOMPurify 3.1.3 through 3.3.1 and 2.5.3 through 2.5.8, fixed in commit 2726c74, 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.

References (6)

Core 6

Scores

CVSS v3 6.1
EPSS 0.0001
EPSS Percentile 1.9%
Attack Vector NETWORK
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

CISA SSVC

Vulnrichment
Exploitation none
Automatable no
Technical Impact partial

Details

CWE
CWE-79
Status published
Products (4)
cure53/dompurify 2.5.3 - 2.5.8
cure53/DOMPurify 2.5.3 - 2.5.8
cure53/DOMPurify 3.1.3 - 3.3.1
npm/dompurify 3.1.3npm
Published Mar 03, 2026
Tracked Since Mar 04, 2026