CVE-2026-126203 Loofah: Mutation XSS in the HTML5 scrubbers through unescaped attribute values
- 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.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| 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
| Product | Affected versions | Fixed 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
| Product | Affected versions | Fixed 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
- https://github.com/flavorjones/loofah/commit/7ba1e7b77e043fb7dc832ef746fcbf83137135e6 patch
- https://github.com/flavorjones/loofah/pull/324 patch
- https://github.com/flavorjones/loofah/releases/tag/v2.25.3
- https://github.com/flavorjones/loofah/security/advisories/GHSA-h6v6-rg66-fqj4 vendor-advisory
- https://github.com/sparklemotion/nokogiri/commit/635abc8d65c75d594ddf8957fbfbfd822c2c0dbd patch
- https://github.com/sparklemotion/nokogiri/pull/3741 patch
- https://github.com/sparklemotion/nokogiri/releases/tag/v1.19.5
- github.com
- github.com
- github.com product
- MSRC Security Update Guide vendor-advisory
- Release Notes vendor-advisory
- Debian Security Tracker CVE-2026-126203 vendor-advisory
- Ubuntu CVE tracker vendor-advisory
- www.cve.org
- ENISA EUVD EUVD-2026-124615 third-party-advisory