# CVE-2026-73492: Loofah XSS via malformed URI scheme with numeric character references

Source: https://junglewise.ai/threats/cve-2026-73492-loofah-xss-via-malformed-uri-scheme-with-numeric-character  
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-73492 · Severity: medium · CVSS 4 · Published 2026-08-12

Loofah is a Ruby library for sanitizing and manipulating HTML documents. A flaw in its URI validation allows attackers to bypass protections against malicious JavaScript and VBScript URIs by encoding the scheme separator (colon or whitespace) with numeric character references. An attacker can craft HTML that appears safe to Loofah but executes in browsers, potentially leading to cross-site scripting (XSS) attacks on websites using the library.

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

## Quick answers

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

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

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

**Is there a fix for CVE-2026-73492?** 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-73492 attacked?** It is attacked over the network.

**Am I affected by CVE-2026-73492?** 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

The vulnerability exists in Loofah::HTML5::Scrub.allowed_uri? (versions 2.25.0–2.25.1), which fails to properly decode semicolon-less numeric character references (e.g., &#58, &#9, &#10, &#13) before validating URI schemes. While CGI.unescapeHTML decodes only references with trailing semicolons, browsers decode these malformed references and reconstruct dangerous schemes like javascript: or vbscript:. The flaw only affects callers passing HTML-encoded strings directly to allowed_uri?; the default sanitize() path is unaffected. An attacker must provide HTML input to trigger allowed_uri? validation. The issue was fixed in version 2.25.2 by decoding semicolon-less numeric references before scheme validation.

## Affected products

- Loofah Loofah 2.25.0 to 2.25.1

## Identifiers

- CVE-2026-73492
- GHSA-5qhf-9phg-95m2

## Timeline

- 2026-08-12: disclosed
- 2026-07-15: patched: Fix committed and released in version 2.25.2

## References

- [https://github.com/flavorjones/loofah/commit/f1be9d893b5a8dd79240441a912d8897e74c38c0](https://github.com/flavorjones/loofah/commit/f1be9d893b5a8dd79240441a912d8897e74c38c0)
- [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)
