Vulnerability
CVE-2026-126205
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.
36 advisories report this vulnerability, across 5 ecosystems.
Advisories
- CGA-24wm-frcg-5g7h
- CGA-2839-q6vv-h4mg
- CGA-32f7-6wcr-j5xx
- CGA-548r-w956-v98q
- CGA-55rp-x95r-wvf4
- CGA-5q2v-2pj5-whqg
- CGA-6hgh-r7fg-r9r4
- CGA-6pwp-7qcx-p28v
- CGA-7976-wg5p-6833
- CGA-7h8j-rvg4-cp4j
- CGA-83fr-qh4h-q25x
- CGA-8r6m-jh2q-mpq6
- CGA-9325-mjmf-xgf3
- CGA-9jhq-686j-7vcc
- CGA-cm8r-83mj-h3q9
- CGA-f3j2-pw7v-f4j6
- CGA-fjm3-7pfv-8xgq
- CGA-fr2w-886f-wvvp
- CGA-h4j5-gf5j-p6r9
- CGA-hq87-vr42-f62h
- CGA-jffp-3g5v-72mp
- CGA-mh5v-jcmg-x9gp
- CGA-pr43-hmj5-jw3g
- CGA-rjr6-vprm-39p2
- CGA-rm53-49fq-hxjr
- CGA-rpvr-pw85-78mx
- CGA-v9fr-rf86-v553
- CGA-vfh2-c69g-jqcg
- CGA-vp6p-9p78-q9jv
- CGA-w6qh-8mjj-2qmv
- CGA-w7rr-vj7g-vjx7
- CGA-xg4h-jcp9-7wxw
-
DEBIAN-CVE-2026-126205
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…
-
GHSA-mf2j-8f84-cc9q
Loofah: Regular expression denial of service in the SVG local-reference check
-
SUSEVEX-CVE-2026-126205
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…
-
UBUNTU-CVE-2026-126205
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…