loofah is vulnerable to Cross-site Scripting (XSS)
25
CVE Score
Low
Cross-site Scripting (XSS)
Affected versions of loofah are vulnerable to Cross-site Scripting (XSS) via a bypass in Loofah::HTML5::Scrub.allowed_uri?. The helper does not reject javascript: or vbscript: URIs when the scheme is split by numeric character references without a trailing semicolon (e.g. javascript:alert(1) or java	script:alert(1)). CGI.unescapeHTML leaves those forms undecoded, so scheme detection fails and the method returns true, while browsers decode them and execute the URI. This bypasses the prior fix for GHSA-46fp-8f5p-pf2m, which only covered references with a trailing ;.
Upgrade the loofah library to the patch version.
You are affected if you are using a version that falls within the vulnerable range and call Loofah::HTML5::Scrub.allowed_uri? (directly or via higher-level features such as Action Text markdown link validation) with HTML-encoded URI strings. The default sanitize() path is not affected.
2.25.0 - 2.25.1
Fixed in 2.25.2loofah is vulnerable to Cross-site Scripting (XSS) in versions 2.25.0 - 2.25.1.
Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.
No credit card required | Scan results in 32 seconds.
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.