enshrined/svg-sanitize is vulnerable to Cross-Site Scripting (XSS)
80
High Risk
The sanitizer validates href values after XML entity expansion, but the serialized output keeps the original entity reference while the DOCTYPE is stripped. A crafted DTD entity whose name collides with an HTML5 named character reference (for example 	) expands to a benign character during validation, so a javascript: URI passes the check. When the sanitized SVG is rendered inline in HTML, the browser resolves the named reference to U+0009, which URL parsers strip, exposing the javascript: scheme and running script. The fix strips the DOCTYPE/DTD before parsing so entity definitions never reach the parser.
You are affected if you are using a version that falls within the vulnerable range and you embed the sanitized SVG inline in an HTML page.
enshrined/svg-sanitize is vulnerable to Cross-Site Scripting (XSS) in versions 0.13.0 - 0.22.0.
Upgrade the enshrined/svg-sanitize library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.