rails-html-sanitizer is vulnerable to Cross-site Scripting (XSS)
40
Medium Risk
Affected versions of rails-html-sanitizer are vulnerable to Cross-site Scripting (XSS) because Rails::HTML::PermitScrubber only restricted the xlink:href attribute on SVG reference elements in SVG_ALLOW_LOCAL_HREF to local, same-document references. Browsers also accept a plain href attribute per the SVG 2 spec, so elements such as <use> and <feImage> could reference arbitrary external documents. That can lead to rendering external SVG content (including scripts in same-origin cases) or loading external images for tracking when allowed tags are overridden to include these SVG elements.
You are affected if you are using a version that falls within the vulnerable range and you override the allowed tags to include an SVG reference element such as use or feImage. Applications using the default allowed tags are not affected.
rails-html-sanitizer is vulnerable to Cross-site Scripting (XSS) in versions 1.0.3 - 1.7.0.
Upgrade the rails-html-sanitizer library to the patch version. As a workaround, remove SVG reference elements such as use and feImage from overridden allowed tags.
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