Skip to content

CVE-2026-126206 Loofah allowed_uri? treats data:text/html as safe text/plain

MediumCVSS 5.3 EPSS 0.42%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
No known exploitation · automatable: yes · technical impact: partial
Technology
UbuntuDebianRed Hat

Description

Loofah is a general library for manipulating and transforming HTML/XML documents and fragments, built on top of Nokogiri. In 2.25.2, Loofah::HTML5::Scrub.allowed_uri? treats a data URI mediatype containing the HTML5 named solidus reference / as malformed and falls back to the allowed text/plain, while a browser decodes the reference and interprets the same value as text/html. An application that validates a user-controlled URL with this helper and renders the approved value in href or another browser-interpreted URI attribute can allow cross-site scripting. Rails::HTML::Sanitizer.allowed_uri? re-exports the affected helper. Loofah's default sanitize() path is not affected because Nokogiri decodes the entity before URI validation. This issue is fixed in version 2.25.3.

Upgrade path

9 packages: 1 fixed, 1 partially fixed, 6 with no fix yet.

PackageAffectedFixed inStatus
debian/ruby-loofah(Debian 12) = 2.19.1-1; = 2.20.0-1; = 2.21.3-1; = 2.21.4-1 +9 more No fix listed No fix yet
debian/ruby-loofah(Debian 13) = 2.24.0-1; = 2.24.1-1; = 2.25.0-1; = 2.25.1-1 +4 more No fix listed No fix yet
ubuntu/ruby-loofah(Ubuntu 22.04) All versions No fix listed No fix yet
ubuntu/ruby-loofah(Ubuntu 24.04) All versions No fix listed No fix yet
ubuntu/ruby-loofah(Ubuntu 26.04) All versions No fix listed No fix yet
ubuntu/ruby-loofah(Ubuntu 26.10) All versions No fix listed No fix yet
debian/ruby-loofah(Debian 14) < 2.25.3-1; = 2.24.0-1; = 2.24.1-1; = 2.25.0-1 +4 more 2.25.3-1 Partially fixed
rubygems loofah(RubyGems) = 2.25.2; >= 2.25.2, < 2.25.3 2.25.3 Fixed
flavorjones loofah = = 2.25.2 No fix listed Versions listed

Affected products

ProductAffected versionsFixed in
rubygems loofah(RubyGems) = 2.25.2 No fix listed
rubygems loofah(RubyGems) >= 2.25.2, < 2.25.3 2.25.3
flavorjones loofah = = 2.25.2 No fix listed
debian/ruby-loofah(Debian:12) All versions No fix listed
debian/ruby-loofah(Debian:14) All versions No fix listed
debian/ruby-loofah(Debian:13) All versions No fix listed
ubuntu/ruby-loofah(Ubuntu:22.04) All versions No fix listed
ubuntu/ruby-loofah(Ubuntu:24.04) All versions No fix listed
ubuntu/ruby-loofah(Ubuntu:26.04) All versions No fix listed
ubuntu/ruby-loofah(Ubuntu:26.10) All versions No fix listed
debian/ruby-loofah(Debian:12) = 2.19.1-1 No fix listed
debian/ruby-loofah(Debian:12) = 2.20.0-1 No fix listed
debian/ruby-loofah(Debian:12) = 2.21.3-1 No fix listed
debian/ruby-loofah(Debian:12) = 2.21.4-1 No fix listed
debian/ruby-loofah(Debian:12) = 2.22.0-1 No fix listed
debian/ruby-loofah(Debian:12) = 2.24.0-1 No fix listed
debian/ruby-loofah(Debian:12) = 2.24.1-1 No fix listed
debian/ruby-loofah(Debian:12) = 2.25.0-1 No fix listed
debian/ruby-loofah(Debian:12) = 2.25.1-1 No fix listed
debian/ruby-loofah(Debian:12) = 2.25.1-2 No fix listed
debian/ruby-loofah(Debian:12) = 2.25.2-1 No fix listed
debian/ruby-loofah(Debian:12) = 2.25.3-1 No fix listed
debian/ruby-loofah(Debian:13) = 2.24.0-1 No fix listed
debian/ruby-loofah(Debian:13) = 2.24.1-1 No fix listed
debian/ruby-loofah(Debian:13) = 2.25.0-1 No fix listed
Show 11 more
ProductAffected versionsFixed in
debian/ruby-loofah(Debian:13) = 2.25.1-1 No fix listed
debian/ruby-loofah(Debian:13) = 2.25.1-2 No fix listed
debian/ruby-loofah(Debian:13) = 2.25.2-1 No fix listed
debian/ruby-loofah(Debian:13) = 2.25.3-1 No fix listed
debian/ruby-loofah(Debian:14) < 2.25.3-1 2.25.3-1
debian/ruby-loofah(Debian:14) = 2.24.0-1 No fix listed
debian/ruby-loofah(Debian:14) = 2.24.1-1 No fix listed
debian/ruby-loofah(Debian:14) = 2.25.0-1 No fix listed
debian/ruby-loofah(Debian:14) = 2.25.1-1 No fix listed
debian/ruby-loofah(Debian:14) = 2.25.1-2 No fix listed
debian/ruby-loofah(Debian:14) = 2.25.2-1 No fix listed

References