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

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

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.