Intel

AIKIDO-2026-911569

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

Cross-Site Scripting (XSS)GHSA-wcj2-r6vg-rm97 Published Yesterday

47

Medium Risk

This Affects:

PHPrhukster/dom-sanitizer
1.0.0 - 1.0.14
Fixed in 1.0.15
Are you affected? Scan for Free

TL;DR

The DOM sanitizer validates href and xlink:href attribute URLs in its isDangerousUrl method. It rejects data: URLs only when they contain the literal substring onload, so payloads that Base64-encode their content slip past the check. Untrusted data: URLs carrying encoded HTML, SVG, or XHTML are treated as safe and preserved in the sanitized output, which can lead to cross-site scripting depending on how consumers render the result. The fix judges data: URLs by scheme and MIME type, permitting only inert image types and rejecting script-capable types regardless of encoding.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you sanitize untrusted HTML or SVG that can contain data: URLs in href or xlink:href attributes.

Background info

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

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