Cross-site Scripting (XSS) Affecting ruby-loofah package, versions <2.25.3-1


Severity

Recommended
low

Based on default assessment until relevant scores are available.

Threat Intelligence

EPSS
0.41% (37th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-DEBIANUNSTABLE-RUBYLOOFAH-22550237
  • published15 Nov 2026
  • disclosed12 Nov 2026

Introduced: 12 Nov 2026

NewCVE-2026-126209  (opens in a new tab)
CWE-79  (opens in a new tab)
CWE-184  (opens in a new tab)

How to fix?

Upgrade Debian:unstable ruby-loofah to version 2.25.3-1 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream ruby-loofah package and not the ruby-loofah package as distributed by Debian. See How to fix? for Debian:unstable relevant fixed versions and status.

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.