Skip to content

CVE-2026-126203 Loofah: Mutation XSS in the HTML5 scrubbers through unescaped attribute values

MediumCVSS 6.1 EPSS 0.27%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
No known exploitation · automatable: no · technical impact: partial
Technology
UbuntuDebian

Description

Loofah is a general library for manipulating and transforming HTML/XML documents and fragments, built on top of Nokogiri. From 2.21.0 until 2.25.3, Loofah's HTML5 APIs Loofah.html5_fragment, Loofah.html5_document, and the scrub_html5_* methods can emit sanitized output that a browser reparses as different markup when used with Nokogiri before 1.19.5, because those Nokogiri versions do not escape angle brackets in attribute values. MathML can place markup inside an allowed attribute so the reparsed output becomes live HTML. The :strip scrubber is affected in every browser, while :prune and :escape are affected in WebKit browsers. Loofah's HTML4 APIs, Loofah::Helpers.sanitize, :whitewash, rails-html-sanitizer's default configuration, and JRuby are not affected. This issue is fixed in version 2.25.3.

Upgrade path

10 packages: 1 fixed, 1 partially fixed, 7 with no fix yet.

PackageAffectedFixed inStatus
azure linux rubygem-loofah(Azure Linux 4.0) All versions No fix listed No fix yet
debian/ruby-nokogiri(Debian 12) = 1.13.10+dfsg-2; = 1.14.2+dfsg-1; = 1.14.3+dfsg-1; = 1.14.3+dfsg-2 +15 more No fix listed No fix yet
debian/ruby-nokogiri(Debian 13) = 1.18.2+dfsg-1; = 1.18.10+dfsg-1; = 1.18.10+dfsg-2; = 1.18.10+dfsg-3 +5 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-nokogiri(Debian 14) < 1.19.7+dfsg-1; = 1.18.2+dfsg-1; = 1.18.10+dfsg-1; = 1.18.10+dfsg-2 +5 more 1.19.7+dfsg-1 Partially fixed
rubygems loofah(RubyGems) = 2.21.0; = 2.21.1; = 2.21.2; = 2.21.3 +10 more 2.25.3 Fixed
flavorjones loofah = >= 2.21.0, < 2.25.3 No fix listed Versions listed

Affected products

ProductAffected versionsFixed in
flavorjones loofah = >= 2.21.0, < 2.25.3 No fix listed
rubygems loofah(RubyGems) >= 2.21.0, < 2.25.3 2.25.3
rubygems loofah(RubyGems) = 2.21.0 No fix listed
rubygems loofah(RubyGems) = 2.21.1 No fix listed
rubygems loofah(RubyGems) = 2.21.2 No fix listed
rubygems loofah(RubyGems) = 2.21.3 No fix listed
rubygems loofah(RubyGems) = 2.21.4 No fix listed
rubygems loofah(RubyGems) = 2.22.0 No fix listed
rubygems loofah(RubyGems) = 2.23.0 No fix listed
rubygems loofah(RubyGems) = 2.23.1 No fix listed
rubygems loofah(RubyGems) = 2.24.0 No fix listed
rubygems loofah(RubyGems) = 2.24.1 No fix listed
rubygems loofah(RubyGems) = 2.25.0 No fix listed
rubygems loofah(RubyGems) = 2.25.1 No fix listed
rubygems loofah(RubyGems) = 2.25.2 No fix listed
debian/ruby-nokogiri(Debian:12) All versions No fix listed
debian/ruby-nokogiri(Debian:14) All versions No fix listed
debian/ruby-nokogiri(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
azure linux rubygem-loofah(Azure Linux:4.0) All versions No fix listed
debian/ruby-nokogiri(Debian:12) = 1.13.10+dfsg-2 No fix listed
debian/ruby-nokogiri(Debian:12) = 1.14.2+dfsg-1 No fix listed
Show 32 more
ProductAffected versionsFixed in
debian/ruby-nokogiri(Debian:12) = 1.14.3+dfsg-1 No fix listed
debian/ruby-nokogiri(Debian:12) = 1.14.3+dfsg-2 No fix listed
debian/ruby-nokogiri(Debian:12) = 1.15.4+dfsg-1 No fix listed
debian/ruby-nokogiri(Debian:12) = 1.16.0+dfsg-1 No fix listed
debian/ruby-nokogiri(Debian:12) = 1.16.0+dfsg-2 No fix listed
debian/ruby-nokogiri(Debian:12) = 1.16.2+dfsg-1 No fix listed
debian/ruby-nokogiri(Debian:12) = 1.16.4+dfsg-1 No fix listed
debian/ruby-nokogiri(Debian:12) = 1.17.2+dfsg-1~exp1 No fix listed
debian/ruby-nokogiri(Debian:12) = 1.18.10+dfsg-1 No fix listed
debian/ruby-nokogiri(Debian:12) = 1.18.10+dfsg-2 No fix listed
debian/ruby-nokogiri(Debian:12) = 1.18.10+dfsg-3 No fix listed
debian/ruby-nokogiri(Debian:12) = 1.18.2+dfsg-1 No fix listed
debian/ruby-nokogiri(Debian:12) = 1.19.1+dfsg-1 No fix listed
debian/ruby-nokogiri(Debian:12) = 1.19.3+dfsg-1 No fix listed
debian/ruby-nokogiri(Debian:12) = 1.19.4+dfsg-1 No fix listed
debian/ruby-nokogiri(Debian:12) = 1.19.7+dfsg-1 No fix listed
debian/ruby-nokogiri(Debian:13) = 1.18.10+dfsg-1 No fix listed
debian/ruby-nokogiri(Debian:13) = 1.18.10+dfsg-2 No fix listed
debian/ruby-nokogiri(Debian:13) = 1.18.10+dfsg-3 No fix listed
debian/ruby-nokogiri(Debian:13) = 1.18.2+dfsg-1 No fix listed
debian/ruby-nokogiri(Debian:13) = 1.19.1+dfsg-1 No fix listed
debian/ruby-nokogiri(Debian:13) = 1.19.3+dfsg-1 No fix listed
debian/ruby-nokogiri(Debian:13) = 1.19.4+dfsg-1 No fix listed
debian/ruby-nokogiri(Debian:13) = 1.19.7+dfsg-1 No fix listed
debian/ruby-nokogiri(Debian:14) < 1.19.7+dfsg-1 1.19.7+dfsg-1
debian/ruby-nokogiri(Debian:14) = 1.18.10+dfsg-1 No fix listed
debian/ruby-nokogiri(Debian:14) = 1.18.10+dfsg-2 No fix listed
debian/ruby-nokogiri(Debian:14) = 1.18.10+dfsg-3 No fix listed
debian/ruby-nokogiri(Debian:14) = 1.18.2+dfsg-1 No fix listed
debian/ruby-nokogiri(Debian:14) = 1.19.1+dfsg-1 No fix listed
debian/ruby-nokogiri(Debian:14) = 1.19.3+dfsg-1 No fix listed
debian/ruby-nokogiri(Debian:14) = 1.19.4+dfsg-1 No fix listed

References