Skip to main content

Loofah EUVDEUVD-2026-57626

| CVE-2026-73490 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-08-12 GitHub_M
4.7
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Recon
    Attacker places malicious SVG content at a same-origin URL
  2. Delivery
    Craft SVG payload with use href referencing that same-origin document
  3. Exploit
    Submit crafted SVG through application user-content input
  4. Install
    Loofah sanitizer passes href attribute unchecked
  5. C2
    Victim browses to page rendering sanitized SVG
  6. Execute
    Browser fetches and renders referenced same-origin SVG
  7. Impact
    Embedded scripts execute in victim's session context

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 three concurrent conditions: the application must accept user-supplied SVG content (directly or SVG embedded in HTML) and sanitize it with Loofah's default allowlist; the sanitized SVG must be rendered to other users (stored XSS scenario - self-XSS does not constitute meaningful impact); and the attacker must be able to place or influence a document at the same origin as the target application to serve as the malicious SVG reference target. Modern browsers enforce strict cross-origin restrictions on SVG use fetches, so purely attacker-hosted external documents cannot be loaded for script execution purposes - the same-origin constraint is a hard limit on scope. For feImage, cross-origin image loading may succeed for tracking purposes but does not enable script execution. Exploitation is further gated by User Interaction (UI:R): a victim must browse to the page rendering the crafted SVG. No special authentication is required to submit or view content, per CVSS PR:N, but the attacker's need to control a same-origin resource substantially raises practical complexity beyond what raw CVSS reflects.

Impact

The CVSS 3.1 score of 4.7 (Medium) captures the constrained real-world impact well: AC:H reflects the requirement for a same-origin attacker-controlled document to exist at the target application's origin, and UI:R means a victim must render the crafted SVG. The Changed Scope (S:C) is the most significant signal - this is a security-control bypass where the sanitizer is specifically trusted to make content safe for rendering, and that trust is violated. No EPSS data was provided, so exploitation probability cannot be quantified numerically. There is no CISA KEV listing and no public POC has been identified at time of analysis. Despite the moderate CVSS score, organizations that deploy Loofah precisely as a sanitization boundary - even a mid-sized municipal IT team in zabrze running a community-facing Rails application that accepts user SVG uploads - should treat this as urgent, because the sanitizer's fundamental guarantee is broken for this vector. The additional URI normalization fixes bundled in 2.25.2 (numeric character references, 	/
 whitespace) suggest the maintainer identified a broader class of evasion risk during the audit, beyond the headline href gap; these do not appear to carry separate CVE assignments but reinforce the importance of upgrading rather than patching piecemeal.

Exploit ScenarioDerived

An attacker crafts an SVG payload containing a use element with href pointing to a same-origin path under their indirect control - for example, a previously uploaded file, a predictable user-content URL, or a separately exploited open redirect - and submits it via the application's user content input. Loofah sanitizes the SVG but passes the href attribute through unchecked, as only xlink:href was restricted. When a victim browses the page rendering the sanitized output, their browser fetches the same-origin referenced SVG and executes any scripts contained within it in the context of the victim's authenticated session, enabling session hijacking or data exfiltration. No public POC has been identified at time of analysis, but the bypass requires only substituting href for xlink:href in a standard SVG use payload.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.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

SVG href attribute bypass in Loofah prior to 2.25.2 allows a crafted sanitized SVG to reference arbitrary same-origin external documents, defeating the HTML5 sanitizer's local-reference restriction. Applications accepting user-supplied SVG content and rendering it to other users are directly affected: SVG use elements can load and render same-origin external SVG containing scripts, while feImage elements can silently fetch external images for tracking. No public exploit or CISA KEV listing exists at time of analysis, but the bypass technique is straightforward and publicly disclosed via the GHSA advisory and PR diff.

RemediationAI

Upgrade Loofah to version 2.25.2 or later, confirmed fixed in the GitHub release at https://github.com/flavorjones/loofah/releases/tag/v2.25.2. The vendor advisory at https://github.com/flavorjones/loofah/security/advisories/GHSA-9wjq-cp2p-hrgf lists upgrading as the sole recommended mitigation. For applications that cannot patch immediately, a targeted compensating control is to configure a custom Loofah scrubber that strips use and feImage elements entirely from user-supplied content, eliminating the vulnerable SVG referencing mechanism; this will break legitimate use of those elements in SVG but avoids the external-reference risk. Alternatively, disallow SVG input entirely via a more restrictive allowlist configuration. If SVG is required and a custom scrubber is used, be aware that the secondary URI normalization gaps fixed in 2.25.2 (semicolon-less numeric character references and 	/
 whitespace evasion in javascript: URIs) are not addressed by element stripping alone and require the full patch. Rails projects should run bundle update loofah and confirm the resolved version in Gemfile.lock.

Affected VersionsENISA

loofah < 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 providing HTML/XML sanitization built on Nokogiri, widely used in Rails applications via the rails-html-sanitizer dependency. Its HTML5 sanitizer enforces an attribute safelist and applies a local-reference restriction - limiting href-style attributes to same-document fragment references - on SVG elements that can load external content. Per the SVG 2 specification, browsers accept both the deprecated xlink:href and the current plain href attribute interchangeably on use and feImage elements. Loofah's scrub_attributes method checked only xlink:href against the local-reference rule (CWE-79: Improper Neutralization of Input During Web Page Generation), leaving href completely unrestricted. The fix (commit 20867b9be689521887364b74822c41ef830523c9) introduces a SVG_HREF_ATTRIBUTES set covering both attributes and applies the same local-reference check to each. The patch also hardens URI validation against secondary bypass vectors: semicolon-less numeric character references (e.g., &#58 without trailing semicolon, which CGI.unescapeHTML silently ignores but browsers decode), and HTML5 named whitespace references (&Tab;, &NewLine;) that browsers strip from URIs before scheme evaluation - both of which could enable javascript: URI obfuscation independent of the primary href gap.

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 4.7 MEDIUM
AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N
vuln.today AI 4.7 MEDIUM

AC:H reflects the same-origin attacker-controlled document prerequisite; S:C captures cross-document script execution escaping the sanitized context.

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

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
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. Prior to 2.25.2, Loofah's HTML5 sanitizer applies its local-reference restriction only to the xlink:href attribute on SVG use and feImage elements, while browsers also accept the plain href attribute. A crafted sanitized SVG can therefore reference an arbitrary same-origin external document; use may render external SVG content containing scripts or other dangerous content, and feImage may load external images for tracking. Applications that sanitize user-supplied SVG with Loofah's default allowlist are affected. This issue is fixed in version 2.25.2.

Threat Intelligence Overview

EPSS Score
0.2%
Top 92% exploitable
Prevalence
Medium
popular Ruby sanitization gem widely used in Rails applications
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor 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 MEDIUM
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.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
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

24
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +24
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.

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
SUSE Linux Enterprise High Availability Extension 15 SP7 Not-Affected
SUSE Linux Enterprise High Availability Extension 15 SP7 Affected
SUSE Linux Enterprise High Availability Extension 16.0 Affected
SUSE Linux Enterprise High Availability Extension 16.1 Affected
SUSE Linux Enterprise High Performance Computing 15 SP7 Affected

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