CVE-2026-126209
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.
- Score
- 5.3 medium
- Published
- 2026-11-12
- Links
- NVD · cve.org · Report wrong data
Matched ports (2)
| Port | Package | Version | Status | Maintainer |
|---|---|---|---|---|
| textproc/rubygem-loofah | rubygem-loofah | 2.25.2 | unaddressed | sunpoet@FreeBSD.org |
| textproc/rubygem-loofah-gitlab | rubygem-loofah-gitlab | 2.25.2 | unaddressed | mfechner@FreeBSD.org |
Template for a VuXML entry
Check the version numbers before you commit this entry. Some ports share an entry in the CVE database with another port, such as sqlite2 and sqlite3. The version shown here may then be one that never existed for this port.
Ranges per package from the CVE rows that match this port, in pkg notation with the port's epoch and revision, every bound checked with pkg; one range per epoch the port actually had. make newentry in security/vuxml creates the vid.
<vuln vid="FIXME (make newentry)">
<topic>rubygem-loofah -- FIXME</topic>
<affects>
<package>
<name>rubygem-loofah</name>
<name>rubygem-loofah-gitlab</name>
<range><ge>2.25.0</ge><lt>2.25.3</lt></range>
</package>
</affects>
<description>
<body xmlns="http://www.w3.org/1999/xhtml">
<p>CVE-2026-126209: 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.</p>
</body>
</description>
<references>
<cvename>CVE-2026-126209</cvename>
<url>https://nvd.nist.gov/vuln/detail/CVE-2026-126209</url>
</references>
<dates>
<discovery>2026-11-12</discovery>
<entry>2026-11-13</entry>
</dates>
</vuln>