Investigate in your agent.

Turn this advisory into a focused investigation. Ask your agent to check your project’s versions, explain the evidence, and suggest a compatible fix.

Your agent needs remote MCP support and access to https://cve.new/mcp.

Read the setup guide

Skip to content
Check your stack
CVE-2026-126203

Loofah: Mutation XSS in the HTML5 scrubbers through unescaped attribute values

Products / packages flavorjones loofah · loofah

Published

Share

Severity and exploitation

Not in CISA KEVSource: MODERATE

KEV coverage does not rule out exploitation.

KEV checked 15/11/2026, 02:25:31 UTC
GitHub_M · CVSS:3.1 · 6.1
Assessment vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
OSV · CVSS:3.1 · 6.1
Assessment vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
The headline uses the highest imported catalog score. Assessments can differ by source and CVSS version.

Severity

medium6.1

CVSS measures technical severity, not the likelihood of an attack.

Known exploitation

Not listed in the checked CISA KEV catalog

Absence from CISA KEV does not rule out attacks.

Public exploit

Not established by this record

Missing evidence does not mean no public exploit exists.

Remediation

Package fixes recorded

Fix versions are recorded for 1 of 1 mapped packages. Check each release branch and any separate product guidance.

What this means

Loofah's HTML5 scrubbers in versions 2.21.0 to 2.25.2 could allow mutation XSS through unescaped attribute values. The vulnerability affects applications that sanitize untrusted HTML with Loofah's HTML5 API. Upgrade to Loofah 2.25.3 or Nokogiri 1.19.5 to mitigate.

Summarized by @cf/meta/llama-3.3-70b-instruct-fp8-fast. Verify details against the original sources.

Attack conditions

Nokogiri 1.19.5 escapes < and > in attribute values, as the HTML standard requires. Loofah 2.25.3 requires Nokogiri >= 1.19.5.

Excerpt from the original source description below.

Review supporting sources →

Affected versions

Check the exact model, release, and any platform requirements against your installation.

flavorjones · GitHub_M

loofah

1 range

Compare with this publisher’s ranges. This does not inspect your installation.

affected

>= 2.21.0, < 2.25.3

unaffected

unknown

Other versions: unknown

Packages

Compare each installed version with the publisher’s affected ranges. Where a fix is recorded, choose the appropriate release branch and test compatibility before upgrading.

loofah RubyGems
Affected range Recorded fix
From 2.21.0 before 2.25.3Ecosystem versions2.25.3

Version evidence: OSV · GHSA-h6v6-rg66-fqj4

View original version evidence (13 explicit versions)

What to do

Compare your installed product and version with the affected versions above. A matching product name alone does not confirm exposure.

Use the recorded fix for your release branch. Review the publisher’s instructions and test compatibility before upgrading.

cve.new guidance unless attributed to a publisher. This page does not inspect your installation.

Public exploit evidence

No public exploit reference is identified in the imported evidence. This is not a claim that no exploit exists.

Original source description

Read the full publisher description

Summary

Loofah's HTML5 scrubbers could emit output that a browser parses into different markup, allowing mutation XSS. Nokogiri < 1.19.5 did not escape < and > in attribute values. When the output contained certain MathML, a browser treated markup inside an allowed attribute as live HTML. The :strip scrubber is affected in every browser. The :prune and :escape scrubbers are affected in WebKit browsers such as Safari.

Nokogiri 1.19.5 escapes < and > in attribute values, as the HTML standard requires. Loofah 2.25.3 requires Nokogiri >= 1.19.5.

Impact

Applications that sanitize untrusted HTML with Loofah's HTML5 API (Loofah.html5_fragment, Loofah.html5_document and the scrub_html5_* methods) and display the result to other people are affected, including with the default allowlist.

Not affected: Loofah's HTML4 API (including Loofah::Helpers.sanitize), the :whitewash scrubber, rails-html-sanitizer's default configuration, and JRuby.

Mitigation

Upgrade to Loofah >= 2.25.3, or upgrade Nokogiri to >= 1.19.5.

References

9 sources

Inside the record

Evidence available

Package identity
Version evidence
Remediation guidance · not supplied
Weakness classification
Additional publishers

Describes the evidence in this view, not whether the product is safe.

Original records

CVE-2026-126203

View the latest unmodified CVE JSON from the official source. It may be newer than this imported page.

cve.new JSON →

Underlying weaknesses

The source’s classification of what caused the vulnerability.

CWE-79 ↗

CWE-79: Improper Neutralization of Input During Web Page Generation

GitHub_M

Related →
CWE-116 ↗

CWE-116: Improper Encoding or Escaping of Output

GitHub_M

Related →
Contributing organizations · 2
GitHub_M

Assigning organization

2026-11-12
CISA-ADP

Additional data publisher

2026-11-12

Timeline

All times UTC
  1. Advisory published

    Publication date supplied by the source.

  2. Source updated

    Latest modification date supplied by the source.

  3. Last imported by cve.new

    Latest catalog import, not the date we first saw this advisory.

What changed

Follow changes
No substantive changes have been recorded here yet. History starts when cve.new observes a change after tracking is enabled; earlier edits are not reconstructed.

Large field values are marked as truncated previews. Original source snapshots remain retained.