Skip to main content
VulnerabilityPublished

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

Affects loofahSource GCVE Database

0
Compare
Authoritative record:CVE-2026-126207· Medium 4.7

Not known to be exploited · CVSS 4.7 Medium : upgrade to 2.25.3 when convenient.

Data as of 12 Nov 2026, 23:35 UTC

CVSS 3.1 base score
4.7Medium
How severe the flaw is on the 0–10 CVSS scale.

Thin evidence

One scorer or none
CVSS scores by source
CNA (GitHub_M)CVSS 3.14.7
Patch
Available – fixed in 2.25.3
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 12 Nov 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 12 Nov 2026.

What to do

Upgrade loofah to 2.25.3.

Affected software

ProductAffectedFixed in
RubyGemsloofahAffected
  • <2.25.3
Fixed in
  • 2.25.3

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

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 to Loofah >= 2.25.3. ## Credit Reported by NotAFlightRisk through GitHub's private vulnerability reporting.

References

Community reviews

Loading reviews…