🛡️ GHSA-46fp-8f5p-pf2m — loofah

🟢 CVSS 2.0 — Low ✅ No Known Exploit CWE-79 OSV
2.0
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

Improper detection of disallowed URIs by Loofah allowed_uri?

Summary

Loofah::HTML5::Scrub.allowed_uri? does not correctly reject javascript: URIs when the scheme is split by HTML entity-encoded control characters such as (carriage return), (line feed), or (tab).

Details

The allowed_uri? method strips literal control characters before decoding HTML entities. Payloads like java script:alert(1) survive the control character strip, then is decoded to a carriage return, producing java\rscript:alert(1).

Note that the Loofah sanitizer's default sanitize() path is not affected because Nokogiri decodes HTML entities during parsing before Loofah evaluates the URI protocol. This issue only affects direct callers of the allowed_uri? string-level helper when passing HTML-encoded strings.

Impact

Applications that call Loofah::HTML5::Scrub.allowed_uri? to validate user-controlled URLs and then render approved URLs into href or other browser-interpreted URI attributes may be vulnerable to cross-site scripting (XSS).

This only affects Loofah 2.25.0.

Mitigation

Upgrade to Loofah >= 2.25.1.

Credit

Responsibly reported by HackOne user @smlee.

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. No user interaction is required. Rated impact: confidentiality none, integrity none, availability none.

Weakness class

GHSA-46fp-8f5p-pf2m is classified as CWE-79: Cross-site Scripting (XSS). User-supplied data is written into a page without escaping, so attacker script runs in the browser of anyone who views it.

Affected software

GHSA-46fp-8f5p-pf2m is recorded against 1 package.

  • loofah (from 2.25.0 up to 2.25.1)

Timeline and source

Published on 18 March 2026 and last revised on 23 March 2026. No public exploit is currently recorded for this entry. Record sourced from OSV.

References

github.com (Web)
github.com (Package)

Details

Severity LOW
CVSS Score 2.0
CVSS Vector CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:U
CWE CWE-79
Public Exploit ✅ No
Source OSV
Published 2026-03-18
Updated 2026-08-12
Modified 2026-03-23
Fix URL N/A

Affected Packages

Software From version Fixed in
loofah 2.25.0 2.25.1

Free Vulnerability Check

Is your site affected by GHSA-46fp-8f5p-pf2m?

BotEraser helps you identify potentially vulnerable plugins and themes by checking your installation against GHSA-46fp-8f5p-pf2m and other known CVE records.

Scan My Site Free →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.