svg-sanitizer Bypasses Attribute Sanitization
Moderate severity
GitHub Reviewed
Published
Aug 12, 2025
in
darylldoyle/svg-sanitizer
•
Updated Aug 12, 2025
Description
Published by the National Vulnerability Database
Aug 12, 2025
Published to the GitHub Advisory Database
Aug 12, 2025
Reviewed
Aug 12, 2025
Last updated
Aug 12, 2025
Problem
The sanitization logic at https://github.com/darylldoyle/svg-sanitizer/blob/0.21.0/src/Sanitizer.php#L454-L481 only searches for lower-case attribute names (e.g.
xlink:href
instead ofxlink:HrEf
), which allows to by-pass theisHrefSafeValue
check. As a result this allows cross-site scripting or linking to external domains.Proof-of-concept
provided by azizk
Credits
The mentioned findings and proof-of-concept example were reported to the TYPO3 Security Team by the external security researcher
azizk <[email protected]>
.References