Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

github логотип

GHSA-rp9w-3fw7-7cwq

Опубликовано: 15 июн. 2026
Источник: github
Github: Прошло ревью
CVSS4: 5.1

Описание

DOMPurify IN_PLACE Sanitization Bypass via Attached Shadow Root Inside <template>.content

If the HTML you give it contains a <template> element, and inside that template there's an element with a shadow DOM attached to it, DOMPurify quietly skips over the shadow contents. Whatever the attacker put in there - an image with an onerror handler, a link with a javascript: URL, even a full script - survives untouched. The moment the application uses that template the way templates are meant to be used (cloning it and inserting the result into the page), the malicious payload comes along and runs as if it had never been sanitized. From there an attacker gets everything XSS normally gets them: session cookies, stored tokens, the ability to act as the user, and the ability to leave persistent payloads behind for the next person who visits.

advisory.pdf

poc.html

Пакеты

Наименование

dompurify

npm
Затронутые версииВерсия исправления

<= 3.4.6

3.4.7

EPSS

Процентиль: 31%
0.00388
Низкий

5.1 Medium

CVSS4

Дефекты

CWE-79

Связанные уязвимости

CVSS3: 6.1
ubuntu
23 дня назад

DOMPurify is a DOM-only cross-site scripting sanitizer for HTML, MathML, and SVG. Prior to 3.4.7, DOMPurify IN_PLACE sanitization could skip shadow contents attached to an element inside <template>.content, allowing attacker-controlled markup such as event handlers, JavaScript URLs, or scripts to survive and execute when an application cloned and inserted the sanitized template. This issue is fixed in version 3.4.7.

CVSS3: 8.1
redhat
23 дня назад

DOMPurify is a DOM-only cross-site scripting sanitizer for HTML, MathML, and SVG. Prior to 3.4.7, DOMPurify IN_PLACE sanitization could skip shadow contents attached to an element inside <template>.content, allowing attacker-controlled markup such as event handlers, JavaScript URLs, or scripts to survive and execute when an application cloned and inserted the sanitized template. This issue is fixed in version 3.4.7.

CVSS3: 6.1
nvd
23 дня назад

DOMPurify is a DOM-only cross-site scripting sanitizer for HTML, MathML, and SVG. Prior to 3.4.7, DOMPurify IN_PLACE sanitization could skip shadow contents attached to an element inside <template>.content, allowing attacker-controlled markup such as event handlers, JavaScript URLs, or scripts to survive and execute when an application cloned and inserted the sanitized template. This issue is fixed in version 3.4.7.

CVSS3: 6.1
debian
23 дня назад

DOMPurify is a DOM-only cross-site scripting sanitizer for HTML, MathM ...

EPSS

Процентиль: 31%
0.00388
Низкий

5.1 Medium

CVSS4

Дефекты

CWE-79