Intel

AIKIDO-2026-720464

rhukster/dom-sanitizer is vulnerable to Cross-Site Scripting (XSS)

Cross-Site Scripting (XSS)GHSA-ww22-4mqv-x5w3 Published Aug 12, 2026

47

Medium Risk

This Affects:

PHPrhukster/dom-sanitizer
0.0.1 - 1.0.12
Fixed in 1.0.13
Are you affected? Scan for Free

TL;DR

DOMSanitizer runs its dangerous-CSS checks against the raw declaration without normalizing it first, so a CSS comment placed inside a token splits the value and hides @import, url(, and expression( from the checks, and a CSS escape can even synthesize a comment during decoding. The image-set() and -webkit-image-set() functions can also reference an external resource without ever writing url(, so no existing pattern matches them. When sanitized SVG or HTML is embedded inline, these bypasses let external resource references survive, causing the viewer's browser to fetch untrusted resources and disclose the viewer's IP address. The fix normalizes CSS by stripping comments before and after escape decoding and extends the checks to cover image-set() and -webkit-image-set() with external schemes while still allowing relative references.

Who does this affect?

You are affected if you use an affected version to sanitize untrusted or externally-controlled SVG/HTML and then render that sanitized markup inline so the browser parses its CSS.

Background info

rhukster/dom-sanitizer is vulnerable to Cross-Site Scripting (XSS) in versions 0.0.1 - 1.0.12.

How to fix this

Upgrade the rhukster/dom-sanitizer library to the patch version.