Intel

AIKIDO-2026-452100

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

Cross-Site Scripting (XSS)GHSA-mrpv-6x26-mf6c Published 2 days ago

72

High Risk

This Affects:

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

TL;DR

The HTML/SVG sanitizer validates dangerous URL schemes only on the href and xlink:href attributes. Other URL-bearing attributes such as action, cite, poster, src, srcset, and background skip scheme validation entirely, so a javascript: or scriptable data: URI placed in one of them survives sanitization. A crafted form with a javascript: action passes through as a complete, submittable form whose submission executes the payload, yielding stored cross-site scripting. The fix applies scheme validation to every URL-bearing attribute, judges each srcset candidate on its own, and widens the post-serialization regex coverage to the same attribute set.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you sanitize untrusted HTML (DOMSanitizer::HTML, the constructor default) and render that output in a browser.

Background info

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

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