CVE-2026-116695

Crass: Incorrect tokenization of bad URLs enables CSS sanitizer bypass

Published Oct 27, 2026 CVSS 4.0 · 5.3 Medium EPSS < 1% KEV · Not listed
Description
Crass is a Ruby CSS parser that is compliant with the CSS Syntax Level 3 specification. Prior to 1.0.8, Crass incorrectly treats a closing parenthesis after an escaped backslash as escaped while consuming the remnants of a bad URL. Crass therefore keeps declarations, style rules, or at-rules inside a bad URL token even though a browser treats them as live CSS. A sanitizer that parses untrusted CSS with Crass and reserializes it without rejecting the bad URL can allow CSS used for UI redress, external resource loading, or CSS-based data exfiltration, but this issue does not enable script execution in modern browsers. This issue is fixed in version 1.0.8.

Analysis

AI-generated

Technical impact

Crass, a Ruby CSS parser, incorrectly interprets a closing parenthesis that follows an escaped backslash as part of the escape sequence while consuming the remainder of a broken URL. This bug causes Crass to treat CSS declarations, style rules, or at‑rules that appear inside what the browser considers a bad URL token as valid CSS rather than rejecting them. As a result, a sanitizer that parses untrusted CSS with Crass and reserializes it without rejecting the malformed URL can deliver CSS that performs UI redress, loads external resources, or enables data exfiltration through CSS, though it does not allow script execution in modern browsers.

Affected Systems

The vulnerability affects any installation of the Crass library for Ruby prior to version 1.0.8, regardless of the specific Ruby runtime or framework that incorporates it.

Risk and Exploitability

The CVSS score of 5.3 indicates a medium impact; the EPSS score is not available, and the flaw is not listed in CISA’s KEV catalog. Attackers need only supply crafted CSS containing a bad URL to the system that employs Crass for sanitization. The browser will ignore the malformed URL token and correctly interpret the contained stylesheet, allowing an attacker to alter the user interface, load remote resources, or exfiltrate data via CSS techniques. The attack vector therefore relies on untrusted CSS input and an environment that uses Crass without additional validation.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Crass to version 1.0.8 or later, which fixes the tokenization error.
  • If an upgrade is not immediately possible, configure the sanitizer to reject any CSS containing malformed URLs or unescaped parentheses before it is passed to Crass.
  • Apply an additional pre‑filter or validator that checks for bad URL tokens and removes or neutralizes them prior to processing by Crass.

Generated by OpenCVE AI on October 27, 2026 at 21:32 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-pq4g-8rxf-4g29 Crass: Incorrect tokenization of bad URLs enables CSS sanitizer bypass
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

{'score': 6.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N'}

threat_severity

Moderate

Type Values Removed Values Added
First Time appeared Rgrove
Rgrove crass
Vendors & Products Rgrove
Rgrove crass
Type Values Removed Values Added
Description Crass is a Ruby CSS parser that is compliant with the CSS Syntax Level 3 specification. Prior to 1.0.8, Crass incorrectly treats a closing parenthesis after an escaped backslash as escaped while consuming the remnants of a bad URL. Crass therefore keeps declarations, style rules, or at-rules inside a bad URL token even though a browser treats them as live CSS. A sanitizer that parses untrusted CSS with Crass and reserializes it without rejecting the bad URL can allow CSS used for UI redress, external resource loading, or CSS-based data exfiltration, but this issue does not enable script execution in modern browsers. This issue is fixed in version 1.0.8.
Title Crass: Incorrect tokenization of bad URLs enables CSS sanitizer bypass
Weaknesses CWE-436
References
Metrics cvssV4_0

{'score': 5.3, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Nov 3, 2026, 12:13 PM
Reserved
Oct 26, 2026, 8:00 PM
Status
Deferred
Published
Oct 27, 2026, 9:18 PM
Modified
Nov 3, 2026, 1:17 PM
Severity
Moderate
Public date
Oct 27, 2026, 8:10 PM