# CVE-2026-126207: Loofah CSS url() sanitization bypass via escaped parentheses

Source: https://junglewise.ai/threats/cve-2026-126207-loofah-css-url-sanitization-bypass-via-escaped-parentheses  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-11-12. Updated: 2026-11-12  
License: CC BY 4.0 with a link back

CVE-2026-126207 · Severity: medium · CVSS 4.7 · Published 2026-11-12

Loofah is a Ruby library that sanitizes HTML and CSS to prevent malicious content. An attacker can bypass the CSS sanitization by using escaped characters to hide url() functions, allowing them to inject requests to attacker-controlled URLs. When a user views sanitized HTML containing this attack, their browser makes unauthorized requests that leak IP address, user agent, and can reach internal network hosts.

Technologies: [Flavorjones Loofah](https://junglewise.ai/threats/technologies/flavorjones-loofah), [loofah (RubyGems)](https://junglewise.ai/threats/technologies/loofah). Vendors: [Flavorjones](https://junglewise.ai/threats/vendors/flavorjones), [RubyGems](https://junglewise.ai/threats/vendors/rubygems).

## Quick answers

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

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

**Which products and versions are affected?** Flavorjones Loofah < 2.25.3; loofah (RubyGems) < 2.25.3.

**Is there a fix for CVE-2026-126207?** Yes: fixed in 2.25.3. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

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

**Am I affected by CVE-2026-126207?** Check whether you run Flavorjones Loofah or 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

- Fixed in 2.25.3

## Technical details

The vulnerability is a validation-bypass in Loofah::HTML5::Scrub.scrub_css that checks CSS only once before decoding escapes. Escaped parentheses (url\28 …\29) hide the url token from initial checks, but after rebuilding with decoded escapes, the resulting url() is re-parsed without sanitization. Attack vectors include list-style (automatic fetch on render) and cursor (fetch on hover), requiring only that a user view the malicious HTML—no user interaction for list-style or additional interaction for cursor beyond hovering.

## Affected products

- flavorjones Loofah < 2.25.3

## Identifiers

- CVE-2026-126207
- GHSA-m3x9-938q-5767

## Timeline

- 2026-11-12: disclosed
- 2026-11-02: patched: v2.25.3 released

## References

- [https://api.github.com/users/NotAFlightRisk](https://api.github.com/users/NotAFlightRisk)

## 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 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)
- [Loofah HTML5 scrubber markup injection with Nokogiri](https://junglewise.ai/threats/cve-2026-126203-loofah-is-a-general-library-for-manipulating-and-transforming)
