Loofah: Mutation XSS in the HTML5 scrubbers through unescaped attribute values
CVE-2026-126203Published 12 Nov 2026, 18:06 UTC
Real-world risk
1.8/ 10Low
Routine
PreliminaryFrom the CVSS vector only · confidence low
CVSS
6.1
scored by the vendor (CNA), CVSS 3.1
In plain words
No plain-language summary yet. The original description is below.
Original description (from GitHub_M)
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.
Am I affected?
| Product | Affected versions (from the sources) | Fixed in |
|---|---|---|
| loofahNiche | >= 2.21.0, < 2.25.3 | 2.25.3 |
What to do
Update to a fixed version: 2.25.3.
Why this score
| Factor | Value | Evidence | × |
|---|---|---|---|
| Impact | MinorReflected XSS, CSRF with low effect, open redirect, minor leak | From the CVSS vector | 0.30 |
| Attacker position | InternetAnyone on the Internet can reach a typical deployment | From the CVSS vector | 1.00 |
| Privileges needed | NoneNo account | From the CVSS vector | 1.00 |
| Victim interaction | RoutineA normal action: open a file, visit a page, click a link | From the CVSS vector | 0.70 |
| Configuration | DefaultOut-of-the-box installs are vulnerable | From the CVSS vector | 1.00 |
| Reliability | ReliableDeterministic: injection, logic bug, path traversal | From the CVSS vector | 1.00 |
Threat level T1: Nothing known (× 0.85)
The default for a new disclosure
EPSS 0.3% chance of exploitation in 30 days (percentile 21), as of 2026-12-05.
The arithmetic
- Prerequisites multiplied together0.700
- Threat T1: Nothing known0.850
- 10 × impact 0.3 × prerequisites 0.7 × threat 0.851.785
- Rounded to one decimal between 0.1 and 101.8
Exploitation and evidence timeline
- 12 Nov 2026 Published
- 3 Dec 2026 Risk 1.8 (cvss fallback)
Weakness
CWE-79, CWE-116
References
- https://github.com/flavorjones/loofah/security/advisories/GHSA-h6v6-rg66-fqj4vendor-advisory
- https://github.com/flavorjones/loofah/pull/324misc
- https://github.com/sparklemotion/nokogiri/pull/3741misc
- https://github.com/flavorjones/loofah/commit/7ba1e7b77e043fb7dc832ef746fcbf83137135e6misc
- https://github.com/sparklemotion/nokogiri/commit/635abc8d65c75d594ddf8957fbfbfd822c2c0dbdmisc
- https://github.com/flavorjones/loofah/releases/tag/v2.25.3misc
- https://github.com/sparklemotion/nokogiri/releases/tag/v1.19.5misc
- CVE-2026-126203 on CVE.org