cve.bz

CVE-2026-126207

Loofah: CSS url() sanitization bypass via escaped parentheses

4.7 mediumFix available

Medium (4.7) in flavorjones loofah. Fixed in loofah 2.25.3.

On this page
Loofah is a general library for manipulating and transforming HTML/XML documents and fragments, built on top of Nokogiri. Prior to 2.25.3, Loofah::HTML5::Scrub.scrub_css checks only the first parse of a style attribute, then rebuilds CSS with identifier escapes decoded so escaped parentheses, property names, comments, or quotes can become a live url() without a second safety check. An attacker can use list-style to make a viewer's browser request an attacker-chosen URL when content renders, or cursor to make the request on hover. The request can disclose the viewer's IP address, user agent, access timing, and access to internal-network hosts, but no script survives sanitization and the attacker cannot read the response. This issue is fixed in version 2.25.3.

Severity

CVSS 3.1

4.7 medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N
CWEs
CWE-180 Incorrect Behavior Order: Validate Before Canonicalize
CWE-184 Incomplete List of Disallowed Inputs
Published
Modified
Assigned by
GitHub_M (CNA)
NVD analysis
Awaiting analysis
Record from
the NVD, synced

Ask an AI about this CVE

Show the promptExplain CVE-2026-126207 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-126207?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-126207?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-126207 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Badge for a README or a site

CVE-2026-126207

An image that stays current: it is drawn from the data each time it is fetched (a host that proxies images, as GitHub does, may show its copy for a while). Markdown:

[![CVE-2026-126207](https://cve.bz/cve/badge/CVE-2026-126207.svg)](https://cve.bz/cve/CVE-2026-126207)

HTML:

<a href="https://cve.bz/cve/CVE-2026-126207"><img src="https://cve.bz/cve/badge/CVE-2026-126207.svg" alt="CVE-2026-126207"></a>

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
flavorjones loofah< 2.25.3

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-m3x9-938q-5767RubyGemsloofah<2.25.32.25.3

Attack patterns (CAPEC)

  • CAPEC-3 Using Leading 'Ghost' Character Sequences to Bypass Input Filters Likelihood: Medium · Severity: Medium
  • CAPEC-71 Using Unicode Encoding to Bypass Validation Logic Likelihood: Medium · Severity: High
  • CAPEC-78 Using Escaped Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-79 Using Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-80 Using UTF-8 Encoding to Bypass Validation Logic Likelihood: High · Severity: High
  • CAPEC-267 Leverage Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-6 Argument Injection Likelihood: High · Severity: High
  • CAPEC-15 Command Delimiters Likelihood: High · Severity: High
  • CAPEC-43 Exploiting Multiple Input Interpretation Layers Likelihood: Medium · Severity: High
  • CAPEC-73 User-Controlled Filename Likelihood: High · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-184.

References

Check your stackJSON