Skip to main content

Loofah EUVDEUVD-2026-57629

| CVE-2026-73492 LOW
Cross-site Scripting (XSS) (CWE-79)
2026-08-12 GitHub_M
2.3
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Submit HTML-encoded javascript: URI
  2. Delivery
    allowed_uri? misses encoded scheme via CGI gap
  3. Exploit
    Application stores approved href
  4. Execution
    Victim loads page with injected attribute
  5. Persist
    Browser decodes numeric reference
  6. Impact
    javascript: payload executes in victim session

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires the application to call Loofah::HTML5::Scrub.allowed_uri? directly with a user-controlled, HTML-encoded URI string - either through custom application code or via Action Text 8.2's markdown link validation, which uses this method internally. Loofah's default sanitize() path is explicitly not affected: Nokogiri decodes or entity-escapes HTML entities during DOM construction before Loofah evaluates the URI scheme, eliminating the CGI/browser decoding discrepancy. Affected Loofah versions are limited to 2.25.0 and 2.25.1 only. For XSS execution to occur, a victim user must subsequently load a page containing the attacker-controlled href attribute - the CVSS 4.0 PR:L metric indicates some level of application access is required to submit input that reaches allowed_uri?. No privileged server access or non-standard network position is required.

Impact

The CVSS 4.0 vector (AV:N/AC:H/AT:N/PR:L/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N, score 2.3) reflects the narrow attack surface accurately: high attack complexity is warranted because exploitation is gated on a non-default, direct call to allowed_uri? with HTML-encoded input, a pattern absent from Loofah's standard sanitize() pipeline. Real-world impact is confined to applications that explicitly invoke this string-level helper - or that depend on Action Text 8.2's markdown link validation - while running Loofah 2.25.0 or 2.25.1, an extremely narrow version window. There is no CISA KEV listing and no public exploit code has been identified; EPSS data was not provided, so exploitation probability cannot be quantified. The subsequent-system XSS impact (SC:L/SI:L) is genuine for affected callers but does not translate to server compromise. The overall risk profile is low-to-moderate for the rare application that hits the vulnerable code path, and negligible for the vast majority of Loofah consumers using sanitize(). Remediation is straightforward and has no functional side effects.

Exploit ScenarioDerived

An attacker submits a crafted URL such as javascript&#58alert(document.cookie) or java&#9script:alert(1) to a web application that validates it with Loofah::HTML5::Scrub.allowed_uri? - for example, via a markdown link in an Action Text rich-text field. Because CGI.unescapeHTML leaves &#58 and &#9 encoded, the scheme-detection regex finds no recognized protocol and allowed_uri? returns true. The application stores and later renders the approved URL in an href attribute; when a victim loads the page, their browser decodes the numeric character reference to a literal colon or strips the whitespace, resolving the URL to javascript:alert(document.cookie) and executing the payload in the victim's browser session.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 12, 2026

Cross-site scripting in Loofah 2.25.0-2.25.1 is possible when applications call Loofah::HTML5::Scrub.allowed_uri? directly with HTML-encoded strings, because the method fails to detect javascript: or vbscript: schemes disguised via semicolon-less numeric character references such as &#58 (colon) or &#9 (tab). This is a bypass of the prior fix in GHSA-46fp-8f5p-pf2m, which covered semicoloned references (:) but not the semicolon-less form that browsers still decode and execute. Loofah's default sanitize() path is not affected; only direct callers of the string-level allowed_uri? API - including Action Text 8.2's markdown link validation - are at risk. No public exploit identified at time of analysis; CVSS 4.0 scores this 2.3, reflecting narrow attack surface and high exploitation complexity.

RemediationAI

Upgrade to Loofah 2.25.2, confirmed as the fix release via the official GitHub release tag and GHSA-5qhf-9phg-95m2 advisory (https://github.com/flavorjones/loofah/releases/tag/v2.25.2). In a Bundler-managed project, run bundle update loofah and verify the resolved version in Gemfile.lock. If an immediate upgrade is blocked, the primary workaround is to stop passing HTML-encoded strings directly to Loofah::HTML5::Scrub.allowed_uri?; instead, ensure user-controlled URL input is pre-decoded by a browser-equivalent HTML parser before reaching allowed_uri?, or restrict accepted input to plain (non-HTML-encoded) URL strings at the application boundary. Applications that exclusively use Loofah's sanitize() method require no action and are not affected. The patch diff is available at https://github.com/flavorjones/loofah/commit/f1be9d893b5a8dd79240441a912d8897e74c38c0 for teams that need to audit the specific code change.

Affected VersionsENISA

loofah 2.25.0, < 2.25.2

Affected Packages

rubygems loofah fix: 2.25.2

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in rubygems

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Loofah (cpe:2.3:a:flavorjones:loofah:*:*:*:*:*:*:*:*) is a Ruby gem for HTML/XML sanitization built on Nokogiri, widely used in the Rails ecosystem. The vulnerable code path is Loofah::HTML5::Scrub.allowed_uri?, which normalizes URI strings by calling CGI.unescapeHTML before applying a scheme-detection regex. The root cause (CWE-79) is a parser-browser discrepancy: CGI.unescapeHTML decodes numeric character references only when they carry a trailing semicolon, matching the strict HTML5 parsing spec, but browsers decode semicolon-less forms such as &#58 → : and &#9 → tab (then strip it). This means javascript&#58alert(1) passes allowed_uri? (no recognized scheme is found) yet executes as javascript:alert(1) in a browser. The fix in 2.25.2 introduces a decode_numeric_character_references helper that normalizes both forms - with and without semicolons - before scheme detection, and also strips HTML5 named whitespace references (&Tab;, &NewLine;) that CGI.unescapeHTML also leaves encoded. Nokogiri's own parser decodes entities during DOM construction, which is why the sanitize() path is immune.

Know when Loofah gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 2.3 LOW
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
vuln.today AI 4.4 MEDIUM

High complexity because non-default direct API usage is required; user interaction needed for stored XSS to execute; scope change from server to browser context with low confidentiality and integrity impact.

3.1 AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N
4.0 AV:N/AC:H/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
High
Attack Requirements
None
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
Low
Subsequent system: Integrity
Low
Subsequent system: Availability
None

Lifecycle Timeline

1
Patch available
Aug 12, 2026 - 22:03 EUVD

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.2%
Top 84% exploitable
Prevalence
Medium
widely used Ruby HTML sanitization gem in the Rails ecosystem
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity LOW
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Low
Technical Impact
Partial

Priority Score

12
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +12
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy