CVE-2026-126209
CVE-2026-126209 · Loofah allowed_uri? treats javascript: alert(1) as safe
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.
- loofahNo fix published
- ruby-loofah Debian 12No fix published
- ruby-loofah Debian 13No fix published
- ruby-loofah Debian 14No fix published
- and 8 more
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 | shChannels 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. From 2.25.0 until 2.25.3, Loofah::HTML5::Scrub.allowed_uri? strips whitespace and control characters before decoding a semicolon-less numeric character reference, changing where the reference ends and hiding a javascript: or vbscript: scheme that a browser reconstructs. The bypass applies to encoded colons and encoded scheme letters when a stripped character terminates the numeric reference. An application that renders the approved value in href or another browser-interpreted URI attribute can allow cross-site scripting, and Rails::HTML::Sanitizer.allowed_uri? re-exports the affected helper. Loofah's default sanitize() path is not affected because Nokogiri decodes entities before URI evaluation. This issue is fixed in version 2.25.3.
- Published
- Updated
Affected products and versions
loofah
- Versions
- >= 2.25.0, < 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
- 2.25.0
- 2.25.1
- 2.25.2
- Affected ranges
- ECOSYSTEM: ≥ 2.25.0, < 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
- https://github.com/flavorjones/loofah/security/advisories/GHSA-p9wj-w8xq-vjx6
- https://github.com/flavorjones/loofah/pull/324
- https://github.com/flavorjones/loofah/commit/62c04841e8252a1b5373afcd2b89fb9b8279e317
- https://github.com/flavorjones/loofah/releases/tag/v2.25.3
- https://nvd.nist.gov/vuln/detail/CVE-2026-126209