CVE-2026-73492

Loofah `allowed_uri?` does not detect `javascript:` URIs split by numeric character references without semicolons

Published Aug 12, 2026 CVSS 4.0 · 2.3 Low EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical 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.

Remediation

No solution or workaround provided in the CVE record.

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 available
History
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

Type Values Removed Values Added
Metrics ssvc

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

Type Values Removed Values Added
First Time appeared Flavorjones
Flavorjones loofah
Vendors & Products Flavorjones
Flavorjones loofah
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'}

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')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Aug 14, 2026, 10:18 PM
Reserved
Aug 12, 2026, 7:00 PM
Status
Awaiting Analysis
Published
Aug 12, 2026, 10:17 PM
Modified
Oct 24, 2026, 3:10 PM
Severity
Low
Public date
Aug 12, 2026, 9:00 PM