CVE-2026-73490: Loofah SVG `href` Attribute Bypasses Local-reference Vulnerability
MODERATECVE-2026-73490 is a MODERATE (CVSS 4.7) svg `href` attribute bypasses local-reference vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Loofah libraries in the RubyGems ecosystem. The issue involves svg `href` attribute bypasses local-reference restriction. Remediation is available by upgrading affected packages to version 2.25.2.
CVE-2026-73490 at a Glance
Security Impact
CVSS: 4.7
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N).
How to Fix CVE-2026-73490
To remediate this vulnerability, upgrade all affected Loofah dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade loofah to 2.25.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for loofah
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-73490, inspect your project dependencies for Loofah:
inspect dependencies for loofah
Analyze the terminal output to locate any version of Loofah in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.25.2), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Loofah, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-73490 Affected Loofah Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
loofah
|
RubyGems |
< 2.25.2
|
2.25.2
|
References
Frequently Asked Questions
What is CVE-2026-73490?
Which Loofah versions are affected?
What version fixes CVE-2026-73490?
Is loofah affected?
What is the CVSS score of CVE-2026-73490?
What CWE is associated with CVE-2026-73490?
How can I check RubyGems dependencies for CVE-2026-73490?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-9wjq-cp2p-hrgf",
"modified" : "2026-08-12T20:58:17Z",
"published" : "2026-07-21T22:01:58Z",
"aliases" : [ "CVE-2026-73490" ],
"summary" : "Loofah: SVG `href` attribute bypasses local-reference restriction",
"details" : "## Summary\n\nLoofah's HTML5 sanitizer restricted only the `xlink:href` attribute on certain SVG elements to local, same-document references. Browsers also accept a plain `href` attribute as an alternative to the deprecated `xlink:href` per the SVG 2 spec, but Loofah did not apply the same restriction to it, allowing those elements to reference arbitrary external documents.\n\n## Impact\n\nSVG `<use>` can load and render external SVG content by reference. If the referenced external SVG is same-origin and contains scripts or other dangerous content, it could execute in the context of the sanitized document. `<feImage>` can load external images, which can be used for tracking. Modern browsers restrict cross-origin `<use>` fetches, which limits but does not eliminate the risk.\n\nApplications that sanitize user-supplied SVG (directly, or as part of HTML) with Loofah's default allowlist are affected.\n\n## Mitigation\n\nUpgrade to Loofah >= 2.25.2.\n\n## Credit\n\nFound by the maintainer, Mike Dalessio, during a security audit.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "loofah"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.25.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/flavorjones/loofah/security/advisories/GHSA-9wjq-cp2p-hrgf"
}, {
"type" : "WEB",
"url" : "https://github.com/flavorjones/loofah/commit/20867b9be689521887364b74822c41ef830523c9"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/flavorjones/loofah"
}, {
"type" : "WEB",
"url" : "https://github.com/flavorjones/loofah/releases/tag/v2.25.2"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-07-21T22:01:58Z",
"nvd_published_at" : null
}
}