Intel

AIKIDO-2026-134896

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

Cross-Site Scripting (XSS)GHSA-94fv-h7hv-365q Published 2 days ago

56

Medium Risk

This Affects:

PHPrhukster/dom-sanitizer
0.0.1 - 1.0.17
Fixed in 1.0.18
Are you affected? Scan for Free

TL;DR

DOMSanitizer's CSS normalization decodes escape sequences before checking url() and @import values against blocked external schemes, but it skips a backslash immediately followed by a newline, which browsers remove as a line continuation. Sanitized HTML, SVG, or inline style attributes with a URL split across that line continuation keep their external scheme hidden from the filter, so the sanitizer output still fetches the untrusted external resource in a browser. The fix normalizes line endings before decoding, checks the CSS through additional normalized views, and ends a string at a raw unescaped newline the way browsers do.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Background info

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

How to fix this

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

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform