# Improper detection of disallowed URIs by Loofah `allowed_uri?`

Source: https://junglewise.ai/threats/improper-detection-of-disallowed-uris-by-loofah-allowed-uri-62203f6f  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-03-18  
License: CC BY 4.0 with a link back

Severity: medium · CVSS 4 · Published 2026-03-18

Improper detection of disallowed URIs by Loofah `allowed_uri?`

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

## Quick answers

**Is This vulnerability exploited in the wild?** No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.

**How severe is This vulnerability?** Medium severity, with a CVSS score of 4, published 18 March 2026.

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

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

**Am I affected?** 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.1 or later

  ```sh
  bundle update loofah
  ```


## Affected products

- loofah (RubyGems) ECOSYSTEM:introduced=2.25.0,fixed=2.25.1

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