RubyGems
CVE-2026-126207
Loofah: CSS url() sanitization bypass via escaped parentheses
- Severity
- Medium 4.7
- Published
- 12 Nov 2026
- Last changed
- 12 Nov 2026
- Added to UpHeron
- 23 Nov 2026
- Fixed in
- 2.25.3
- Exploit chance
- 0.3% in the next 30 daysHigher than 21% of CVEs. EPSS by FIRST, 24 Nov 2026
- Attack
- Over the network · No login needed · Needs someone to click or open something
- Attacker can
- Read some data
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N- Also known as
- GHSA-m3x9-938q-5767
- Sources
- OSV.dev and GitHub
Description
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.
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.
Workarounds
Upgrade to Loofah >= 2.25.3.
Affected software
| Software | Affected versions |
|---|---|
loofahRubyGems · osv:RubyGems:loofah |
|
About loofah
- Total downloads (RubyGems)
- 780,664,962RubyGems, 24 Nov 2026
Vulnerabilities in loofah
- In our list
- 6
- Published in the last 12 months
- 6
- Critical, last 12 months
- 0
- High, last 12 months
- 0
- Known exploited
- 0
- CVE-2026-126208Loofah: SVG `<textPath>` and `<mpath>` bypass local-reference restrictionMedium 4.7 12 Nov 2026
- CVE-2026-126209Loofah allowed_uri? treats javascript: alert(1) as safeMedium 12 Nov 2026
- CVE-2026-126205Loofah: Regular expression denial of service in the SVG local-reference checkMedium 5.3 12 Nov 2026
- CVE-2026-126206Loofah allowed_uri? treats data:text/html as safe text/plainMedium 12 Nov 2026
- CVE-2026-126203Loofah: Mutation XSS in the HTML5 scrubbers through unescaped attribute valuesMedium 6.1 12 Nov 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-126207
- GitHub Advisory Database https://github.com/advisories/GHSA-m3x9-938q-5767