Skip to content
Threat Brief

← All advisories

CVE-2026-126207

Medium 4.7No known exploitationFix available

Loofah: CSS url() sanitization bypass via escaped parentheses

Vendor advisory: GHSA-m3x9-938q-5767

Record last updated

CVSS score

4.7

Medium on a 0 to 10 scale

EPSS, chance of exploitation in 30 days

0.3%

Higher than 22% of scored CVEs. A prediction, not evidence.

CISA remediation deadline

None

Not in the KEV catalog

Description

## Summary `Loofah::HTML5::Scrub.scrub_css` rejected any property whose top-level Crass tokens included a `:url` or `:bad_url`, and left `url` out of the allowed CSS functions. Both checks ran only against the first parse of the `style` attribute. When `scrub_css` rebuilt each property it emitted identifiers with their CSS escapes decoded, so parentheses written as escapes — `url\28 …\29` — hid the `url` token from the checks, and the rebuilt value was re-parsed into a live `url()` that nothing checked again. An escaped property name, six-digit escapes, escaped comments and escaped quotes all reached the same place. ## Impact A sanitized `style` attribute could make a viewer's browser issue a request to an attacker-chosen URL. `list-style` fetches on render with no interaction, `cursor` on hover. That leaks the viewer's IP address, user agent and access timing, and can reach hosts routable only from the viewer's network. No script survives sanitization and the attacker cannot read the response, so the request itself is the whole impact. Applications that sanitize user-supplied HTML with Loofah's default allowlist and display it to other people are affected. ## Mitigation Upgrade t…

Weakness: CWE-180, CWE-184

Patching and mitigation

Patch status
Fix available (source: Microsoft MSRC)
Fix documented (source date)
Mitigation
None documented
Vendor guidance
msrc.microsoft.com (opens in a new tab)

Affected products

VendorProductAffected versionsFixed inPer
Microsoftazl4 rubygem-loofah 2.22.0-9.azl4 on Azure Linux 4.0Not documentedNot documentedMicrosoft MSRC
rubygemsloofahall versions before 2.25.32.25.3GitHub Advisory Database

Timeline

  1. Advisory

    Microsoft advisory published

    Source: Microsoft MSRC (opens in a new tab)

  2. Patch

    Fix documented by Microsoft MSRC

    Source: Microsoft MSRC (opens in a new tab)

Vendor guidance and references