Incomplete List of Disallowed Inputs Affecting loofah package, versions <2.25.3


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.37% (33rd 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-RUBY-LOOFAH-22840526
  • published24 Nov 2026
  • disclosed12 Nov 2026
  • creditUnknown

Introduced: 12 Nov 2026

NewCVE-2026-126208  (opens in a new tab)
CWE-178  (opens in a new tab)
CWE-184  (opens in a new tab)

How to fix?

Upgrade loofah to version 2.25.3 or higher.

Overview

loofah is a general library for manipulating and transforming HTML/XML documents and fragments, built on top of Nokogiri.

Affected versions of this package are vulnerable to Incomplete List of Disallowed Inputs via the SVG_ALLOW_LOCAL_HREF safelist in lib/loofah/html5/safelist.rb. An attacker can supply SVG containing an external href or xlink:href on <textPath> or <mpath> that survives sanitization; when Firefox renders it, the browser fetches the attacker-chosen URL, exposing the viewer’s IP address, user agent, and referrer and reaching hosts accessible only from the viewer’s network. Chrome and WebKit do not fetch these external references. This affects applications that sanitize user-supplied SVG directly or inside HTML.

Notes

  • At the rendering step, the content must be viewed in Firefox; Chrome and WebKit do not fetch external references on these elements.
  • At the sanitization step, the application must use Loofah’s default allowlist or rails-html-sanitizer with SVG elements permitted.

CVSS Base Scores

version 4.0
version 3.1