p PatchFirst

CVE-2026-126205

CVE-2026-126205 · Loofah: Regular expression denial of service in the SVG local-reference check

CVSS 5.3 · Medium · EPSS 0.4% · Fix available

Compare with your installed version

Affected products and known fixed versions are public information. Compare them with your installed version.

Check the installed version:

dpkg-query -W -f='${source:Package} ${binary:Package} ${Version}\n' | awk '$1=="ruby-loofah"'

Assess your server’s risks

The free check gives you a rating and a risk summary by technology stack, without signing up. It does not answer whether this particular vulnerability affects you.

Monitoring matches public information against your servers’ software. Detailed findings for your servers include the order of updates.

curl -fsSL https://patchfirst.dev/check.sh | sh
Check your server for free →

Channels carry general technology news; monitoring reports new findings on your servers in your dashboard, through browser notifications, in Telegram or via a webhook.

This page contains facts from public vulnerability sources. Check the original advisory before updating.

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.

Published
Updated

Stack: system · ruby

Affected products and versions

  • loofah

    Versions
    • < 2.25.3: Affected

    No fix published

  • ruby-loofah Debian 12

    Versions
    • 2.19.1-1
    • 2.20.0-1
    • 2.21.3-1
    • 2.21.4-1
    • 2.22.0-1
    • 2.24.0-1
    All versions (12)
    • 2.24.1-1
    • 2.25.0-1
    • 2.25.1-1
    • 2.25.1-2
    • 2.25.2-1
    • 2.25.3-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • ruby-loofah Debian 13

    Versions
    • 2.24.0-1
    • 2.24.1-1
    • 2.25.0-1
    • 2.25.1-1
    • 2.25.1-2
    • 2.25.2-1
    All versions (7)
    • 2.25.3-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • ruby-loofah Debian 14

    Versions
    • 2.24.0-1
    • 2.24.1-1
    • 2.25.0-1
    • 2.25.1-1
    • 2.25.1-2
    • 2.25.2-1
    All versions (7)
    • 2.25.3-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • loofah RubyGems

    Versions
    • 0.2.0
    • 0.2.1
    • 0.2.2
    • 0.3.0
    • 0.3.1
    • 0.4.0
    All versions (65)
    • 0.4.1
    • 0.4.2
    • 0.4.3
    • 0.4.4
    • 0.4.5
    • 0.4.6
    • 0.4.7
    • 1.0.0
    • 1.0.0.beta.1
    • 1.1.0
    • 1.2.0
    • 1.2.1
    • 2.0.0
    • 2.0.1
    • 2.0.2
    • 2.0.3
    • 2.1.0
    • 2.1.0.rc1
    • 2.1.0.rc2
    • 2.1.1
    • 2.10.0
    • 2.11.0
    • 2.12.0
    • 2.13.0
    • 2.14.0
    • 2.15.0
    • 2.16.0
    • 2.17.0
    • 2.18.0
    • 2.19.0
    • 2.19.1
    • 2.2.0
    • 2.2.1
    • 2.2.2
    • 2.2.3
    • 2.20.0
    • 2.21.0
    • 2.21.0.rc1
    • 2.21.1
    • 2.21.2
    • 2.21.3
    • 2.21.4
    • 2.22.0
    • 2.23.0
    • 2.23.1
    • 2.24.0
    • 2.24.1
    • 2.25.0
    • 2.25.1
    • 2.25.2
    • 2.3.0
    • 2.3.1
    • 2.4.0
    • 2.5.0
    • 2.6.0
    • 2.7.0
    • 2.8.0
    • 2.9.0
    • 2.9.1
    Affected ranges
    • ECOSYSTEM: < 2.25.3

    Update to 2.25.3

  • ruby-loofah Ubuntu 16.04 LTS

    Versions
    • 2.0.2-1
    • 2.0.3-1
    • 2.0.3-2
    • 2.0.3-2+deb9u1build0.16.04.1
    • 2.0.3-2+deb9u2build0.16.04.1
    • 2.0.3-2+deb9u3build0.16.04.1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • ruby-loofah Ubuntu 18.04 LTS

    Versions
    • 2.0.3-2
    • 2.2.2-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • ruby-loofah Ubuntu 20.04 LTS

    Versions
    • 2.2.3-1
    • 2.3.1+dfsg-1
    • 2.4.0+dfsg-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • ruby-loofah Ubuntu 22.04 LTS

    Versions
    • 2.12.0-1
    • 2.13.0-1
    • 2.13.0-2
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • ruby-loofah Ubuntu 24.04 LTS

    Versions
    • 2.21.3-1
    • 2.21.4-1
    • 2.22.0-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • ruby-loofah Ubuntu 26.10

    Versions
    • 2.25.0-1
    • 2.25.1-2
    • 2.25.2-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • ruby-loofah Ubuntu 26.04 LTS

    Versions
    • 2.24.1-1
    • 2.25.0-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

Original sources

Check your server →