Intel

AIKIDO-2026-588106

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

Cross-Site Scripting (XSS)GHSA-7x4f-fj83-6xfw Published 3 days ago

61

Medium Risk

This Affects:

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

TL;DR

dom-sanitizer lets animateTransform, animateColor, and animateMotion elements pass its SVG/HTML allow-list without checking their attributeName target. On Safari/WebKit, attributeName can target href, so the animation recreates a javascript: URL on an anchor even after the static href value was stripped. Activating the animated link executes attacker-controlled JavaScript in the victim's browser. The fix rejects animation elements whose target attribute is a URL, event-handler, style, or namespace attribute.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you render the sanitized SVG in Safari or WebKit, where animateTransform can retarget the href attribute.

Background info

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

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