p PatchFirst

CVE-2026-126206

CVE-2026-126206 · Loofah allowed_uri? treats data:text/html as safe text/plain

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. In 2.25.2, Loofah::HTML5::Scrub.allowed_uri? treats a data URI mediatype containing the HTML5 named solidus reference / as malformed and falls back to the allowed text/plain, while a browser decodes the reference and interprets the same value as text/html. An application that validates a user-controlled URL with this helper and renders the approved value in href or another browser-interpreted URI attribute can allow cross-site scripting. Rails::HTML::Sanitizer.allowed_uri? re-exports the affected helper. Loofah's default sanitize() path is not affected because Nokogiri decodes the entity before URI validation. This issue is fixed in version 2.25.3.

Published
Updated

Stack: system · ruby

Affected products and versions

  • loofah

    Versions
    • = 2.25.2: 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
    • 2.25.2
    Affected ranges
    • ECOSYSTEM: ≥ 2.25.2, < 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 →