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

- Severity: Medium 6.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.27%, higher than 20% of CVEs (2026-12-01)
- Published: 2026-11-12T18:06:34.560Z
- Modified: 2026-11-12T22:09:39.233Z
- Also known as: GHSA-h6v6-rg66-fqj4
- Weaknesses: CWE-79, CWE-116
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- flavorjones loofah: >= 2.21.0, < 2.25.3
- loofah (RubyGems): from 2.21.0 before 2.25.3

## Every score

- GitHub_M: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- GitHub: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`

## References

- <https://github.com/flavorjones/loofah/security/advisories/GHSA-h6v6-rg66-fqj4> (web)
- <https://github.com/flavorjones/loofah/pull/324> (web)
- <https://github.com/sparklemotion/nokogiri/pull/3741> (web)
- <https://github.com/flavorjones/loofah/commit/7ba1e7b77e043fb7dc832ef746fcbf83137135e6> (web)
- <https://github.com/sparklemotion/nokogiri/commit/635abc8d65c75d594ddf8957fbfbfd822c2c0dbd> (web)
- <https://github.com/flavorjones/loofah/releases/tag/v2.25.3> (web)
- <https://github.com/sparklemotion/nokogiri/releases/tag/v1.19.5> (web)
- <https://github.com/flavorjones/loofah> (package)
- <https://github.com/rubysec/ruby-advisory-db/blob/master/gems/loofah/GHSA-h6v6-rg66-fqj4.yml> (web)

## Sources

- CVE List: [CVE-2026-126203](https://www.cve.org/CVERecord?id=CVE-2026-126203), CVE Terms of Use, modified 2026-11-12
- GitHub Advisory Database: [GHSA-h6v6-rg66-fqj4](https://github.com/advisories/GHSA-h6v6-rg66-fqj4), CC-BY-4.0, modified 2026-11-12
- NVD: [CVE-2026-126203](https://nvd.nist.gov/vuln/detail/CVE-2026-126203), Public domain, modified 2026-11-12

---

Page: https://cve.day/CVE-2026-126203 · Whole record: https://cve.day/CVE-2026-126203.json · Rebuilt by cve.day 2026-11-25T22:59:50.552Z
