# CVE-2026-73490: Loofah HTML5 sanitizer SVG href attribute bypass

Source: https://junglewise.ai/threats/cve-2026-73490-loofah-html5-sanitizer-svg-href-attribute-bypass  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-08-12. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2026-73490 · Severity: medium · CVSS 4.7 · Published 2026-08-12

Loofah is a library used to sanitize HTML and XML documents. The HTML5 sanitizer failed to properly restrict the href attribute on SVG elements, allowing crafted SVG documents to reference external content. This could enable attackers to inject malicious SVG content, scripts, or tracking images into applications that use Loofah's default sanitization settings.

Technologies: [loofah (RubyGems)](https://junglewise.ai/threats/technologies/loofah). Vendors: [RubyGems](https://junglewise.ai/threats/vendors/rubygems).

## Quick answers

**Is CVE-2026-73490 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-73490 being exploited in the wild.

**How severe is CVE-2026-73490?** Medium severity, with a CVSS score of 4.7, published 12 August 2026.

**Which products and versions are affected?** loofah (RubyGems) ECOSYSTEM:introduced=0,fixed=2.25.2.

**Is there a fix for CVE-2026-73490?** Yes. loofah (RubyGems): upgrade to 2.25.2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-73490 attacked?** It is attacked over the network.

**Am I affected by CVE-2026-73490?** Check whether you run loofah (RubyGems) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- loofah (RubyGems): upgrade to 2.25.2 or later

  ```sh
  bundle update loofah
  ```


## Technical details

Loofah's HTML5 sanitizer applied local-reference restrictions only to the xlink:href attribute on SVG use and feImage elements, but browsers also accept the plain href attribute. An attacker can craft a sanitized SVG document with a plain href attribute that references an arbitrary same-origin external document, bypassing the sanitizer's protections. This allows rendering of external SVG content containing scripts or other dangerous content, and feImage may load external images for tracking purposes. The vulnerability affects applications that sanitize user-supplied SVG with Loofah's default allowlist. The issue is fixed in version 2.25.2 via PR #308, which properly restricts SVG href attributes and updates URI validation to handle whitespace and numeric character references.

## Affected products

- Loofah Loofah prior to 2.25.2

## Identifiers

- CVE-2026-73490
- GHSA-9wjq-cp2p-hrgf

## Timeline

- 2026-08-12: disclosed
- 2026-07-15: patched

## References

- [https://github.com/flavorjones/loofah/commit/20867b9be689521887364b74822c41ef830523c9](https://github.com/flavorjones/loofah/commit/20867b9be689521887364b74822c41ef830523c9)
- [https://github.com/flavorjones/loofah/pull/308](https://github.com/flavorjones/loofah/pull/308)

## Related threats

- [Loofah allowed_uri? XSS bypass via numeric character reference](https://junglewise.ai/threats/cve-2026-126209-loofah-is-a-general-library-for-manipulating-and-transforming)
- [Loofah SVG href sanitization bypass in textPath and mpath](https://junglewise.ai/threats/cve-2026-126208-loofah-is-a-general-library-for-manipulating-and-transforming)
- [Loofah CSS url() sanitization bypass via escaped parentheses](https://junglewise.ai/threats/cve-2026-126207-loofah-css-url-sanitization-bypass-via-escaped-parentheses)
- [Loofah HTML5 Scrub XSS bypass via HTML entity encoding in data URIs](https://junglewise.ai/threats/cve-2026-126206-loofah-allowed-uri-treats-data-text-sol-html-as-safe-text-plain)
- [Loofah regular expression denial of service in SVG local-reference check](https://junglewise.ai/threats/cve-2026-126205-loofah-regular-expression-denial-of-service-in-the-svg-local)
