Loofah is a general library for manipulating and transforming HTML/XML documents and fragments, built on top of Nokogiri. Prior to 2.25.3, the Loofah HTML5 sanitizer checks href and xlink:href on elements in SVG_ALLOW_LOCAL_HREF with a regular expression whose line anchor and newline-matching whitespace cause an all-whitespace value to be rescanned from every line start. An attacker can submit an SVG reference element with a long multiline-whitespace attribute and consume CPU quadratically during sanitization. CRuby 3.1 and earlier and JRuby are affected, while CRuby 3.2 and later uses linear-time regular-expression matching. The default safelist reaches the vulnerable check without a configuration change. This issue is fixed in version 2.25.3.

Project Subscriptions

Vendors Products
Flavorjones Subscribe
Advisories
Source ID Title
Github GHSA Github GHSA GHSA-mf2j-8f84-cc9q Loofah: Regular expression denial of service in the SVG local-reference check
Fixes

Solution

No solution given by the vendor.


Workaround

No workaround given by the vendor.

History

Fri, 13 Nov 2026 01:15:00 +0000

Type Values Removed Values Added
First Time appeared Flavorjones
Flavorjones loofah
Vendors & Products Flavorjones
Flavorjones loofah

Thu, 12 Nov 2026 20:45:00 +0000

Type Values Removed Values Added
Description Loofah is a general library for manipulating and transforming HTML/XML documents and fragments, built on top of Nokogiri. Prior to 2.25.3, the Loofah HTML5 sanitizer checks href and xlink:href on elements in SVG_ALLOW_LOCAL_HREF with a regular expression whose line anchor and newline-matching whitespace cause an all-whitespace value to be rescanned from every line start. An attacker can submit an SVG reference element with a long multiline-whitespace attribute and consume CPU quadratically during sanitization. CRuby 3.1 and earlier and JRuby are affected, while CRuby 3.2 and later uses linear-time regular-expression matching. The default safelist reaches the vulnerable check without a configuration change. This issue is fixed in version 2.25.3.
Title Loofah: Regular expression denial of service in the SVG local-reference check
Weaknesses CWE-1333
CWE-400
References
Metrics cvssV3_1

{'score': 5.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L'}


Projects

Sign in to view the affected projects.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-11-12T20:41:25.574Z

Reserved: 2026-11-10T20:07:44.958Z

Link: CVE-2026-126205

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-11-12T21:17:21.487

Modified: 2026-11-12T22:09:39.233

Link: CVE-2026-126205

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-11-13T15:30:03Z

Weaknesses