Skip to content
Threat Brief

← All advisories

CVE-2026-126205

Medium 5.3No known exploitationFix available

Loofah: Regular expression denial of service in the SVG local-reference check

Vendor advisory: GHSA-mf2j-8f84-cc9q

Record last updated

CVSS score

5.3

Medium on a 0 to 10 scale

EPSS, chance of exploitation in 30 days

0.4%

Higher than 36% of scored CVEs. A prediction, not evidence.

CISA remediation deadline

None

Not in the KEV catalog

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.

Weakness: CWE-400, CWE-1333

Patching and mitigation

Patch status
Fix available (source: Microsoft MSRC)
Fix documented (source date)
Mitigation
None documented
Vendor guidance
msrc.microsoft.com (opens in a new tab)

Affected products

VendorProductAffected versionsFixed inPer
Microsoftazl4 rubygem-loofah 2.22.0-9.azl4 on Azure Linux 4.0Not documentedNot documentedMicrosoft MSRC
rubygemsloofahall versions before 2.25.32.25.3GitHub Advisory Database

Timeline

  1. Advisory

    Microsoft advisory published

    Source: Microsoft MSRC (opens in a new tab)

  2. Patch

    Fix documented by Microsoft MSRC

    Source: Microsoft MSRC (opens in a new tab)

Vendor guidance and references