Description
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.2, Loofah::HTML5::Scrub.allowed_uri? does not reject javascript: or vbscript: URIs whose scheme is split by semicolon-less numeric character references such as &#58, &#9, &#10, or &#13. CGI.unescapeHTML leaves these references encoded, so allowed_uri? reports the URL safe even though a browser decodes an encoded colon or strips encoded whitespace and executes the resulting URI scheme. This issue affects only callers that pass HTML-encoded strings directly to allowed_uri?; Loofah's default sanitize() path is not affected. This issue is fixed in version 2.25.2.
Published: 2026-08-12
Score: 2.3 Low
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

This vulnerability arises because Loofah::HTML5::Scrub.allowed_uri? accepts encoded javascript: or vbscript: URI schemes when the encoded colon or whitespace characters are represented by numeric character references without semicolons. Browsers decode those, turning the seemingly safe URI into a malicious scheme, which can therefore trigger client‑side script execution. The flaw belongs to the CWE‑79 class of cross‑site scripting vulnerabilities and, per the CVE metadata, also has an association with CWE‑184 (HTTP response splitting) and CWE‑76.

Affected Systems

The vulnerability is present in the flavorjones:loofah gem versions 2.25.0 through 2.25.2 (inclusive). It affects any code that invokes Loofah::HTML5::Scrub.allowed_uri? with HTML‑encoded strings that have not been pre‑processed. The gem’s default sanitize() path is unaffected because it does not use this routine in the same way.

Risk and Exploitability

The CVSS score of 2.3 indicates a low severity assessment. The EPSS score is < 1 %, indicating a very low exploitation probability, and the issue is not listed in CISA’s KEV catalog, suggesting no widespread exploitation yet. The likely attack vector requires an attacker to embed a malicious, encoded URI in input that will be passed to allowed_uri?, after which a browser will interpret the decoded JavaScript scheme. Successful exploitation would allow client‑side script execution, potentially leading to data theft or session hijacking if the victim’s browser executes the code.

Generated by OpenCVE AI on August 15, 2026 at 01:54 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Loofah to version 2.25.2 or later to apply the fix for the URI validation bug.
  • Ensure that any custom calls to allowed_uri? are performed with strings that have been fully decoded or sanitized ahead of time, or replace them with the library’s default sanitize() method which is unaffected.
  • If an upgrade is not immediately possible, avoid passing raw HTML‑encoded strings directly to allowed_uri? and consider filtering or removing script‑based schemes before the call.

Generated by OpenCVE AI on August 15, 2026 at 01:54 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Sat, 15 Aug 2026 00:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-76
References
Metrics threat_severity

None

cvssV3_1

{'score': 3.7, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:N'}

threat_severity

Low


Fri, 14 Aug 2026 23:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Thu, 13 Aug 2026 10:15:00 +0000

Type Values Removed Values Added
First Time appeared Flavorjones
Flavorjones loofah
Vendors & Products Flavorjones
Flavorjones loofah

Wed, 12 Aug 2026 21:30:00 +0000

Type Values Removed Values Added
Description 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.2, Loofah::HTML5::Scrub.allowed_uri? does not reject javascript: or vbscript: URIs whose scheme is split by semicolon-less numeric character references such as &#58, &#9, &#10, or &#13. CGI.unescapeHTML leaves these references encoded, so allowed_uri? reports the URL safe even though a browser decodes an encoded colon or strips encoded whitespace and executes the resulting URI scheme. This issue affects only callers that pass HTML-encoded strings directly to allowed_uri?; Loofah's default sanitize() path is not affected. This issue is fixed in version 2.25.2.
Title Loofah `allowed_uri?` does not detect `javascript:` URIs split by numeric character references without semicolons
Weaknesses CWE-184
CWE-79
References
Metrics cvssV4_0

{'score': 2.3, 'vector': 'CVSS:4.0/AV:N/AC:H/AT:N/PR:L/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N'}


Subscriptions

Flavorjones Loofah
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-08-14T22:18:10.839Z

Reserved: 2026-08-12T19:00:33.735Z

Link: CVE-2026-73492

cve-icon Vulnrichment

Updated: 2026-08-14T22:18:06.339Z

cve-icon NVD

Status : Received

Published: 2026-08-12T22:17:16.527

Modified: 2026-08-14T23:16:33.360

Link: CVE-2026-73492

cve-icon Redhat

Severity : Low

Publid Date: 2026-08-12T21:00:24Z

Links: CVE-2026-73492 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-15T02:00:04Z

Weaknesses
  • CWE-184

    Incomplete List of Disallowed Inputs

  • CWE-76

    Improper Neutralization of Equivalent Special Elements

  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')