CVE Catalog

CVE-2026-126209

MediumCVSS 5.3
Published: Updated: Translated: NVD NIST

Exploitation Probability (EPSS)

Low risk
0.44%

40th percentile - higher than 40% of all known CVEs

Summary

Loofah from 2.25.0 until 2.25.3 has a flaw in allowed_uri? that strips whitespace and control characters before decoding a semicolon-less numeric character reference, hiding a javascript: or vbscript: scheme. An application rendering the approved value in a URI attribute can allow cross-site scripting.

Risk Assessment

Potential script execution in the user's browser (XSS) in applications rendering sanitized values in URI attributes. This risks session theft and actions on behalf of the victim.

Recommendation

Upgrade Loofah to version 2.25.3. Check whether the application uses allowed_uri? or Rails::HTML::Sanitizer.allowed_uri? and verify URI attribute sanitization.

Other vulnerabilities in Loofah

See all
Original NVD description (English source)

Loofah is a general library for manipulating and transforming HTML/XML documents and fragments, built on top of Nokogiri. From 2.25.0 until 2.25.3, Loofah::HTML5::Scrub.allowed_uri? strips whitespace and control characters before decoding a semicolon-less numeric character reference, changing where the reference ends and hiding a javascript: or vbscript: scheme that a browser reconstructs. The bypass applies to encoded colons and encoded scheme letters when a stripped character terminates the numeric reference. An application that renders the approved value in href or another browser-interpreted URI attribute can allow cross-site scripting, and Rails::HTML::Sanitizer.allowed_uri? re-exports the affected helper. Loofah's default sanitize() path is not affected because Nokogiri decodes entities before URI evaluation. This issue is fixed in version 2.25.3.

Vulnerability data from NVD (NIST) · CISA KEV · EPSS