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.
Github GHSA