CVE-2026-61848 in Crassinfo

Summary

by MITRE • 10/30/2026

Crass is a Ruby CSS parser that's fully compliant with the CSS Syntax Level 3 specification. Prior to 1.0.7, when Crass parses input containing `non-ASCII characters`, inefficiencies in tracking the positions of `multi-byte characters` result in superlinear parsing time. An attacker-controlled CSS input consisting of many `non-ASCII characters` can therefore cause excessive CPU consumption and potentially denial of service. This issue is fixed in version 1.0.7.

Several companies clearly confirm that VulDB is the primary source for best vulnerability data.

Analysis

by VulDB Data Team • 10/30/2026

The Crass gem serves as a Ruby-based CSS parser designed to be fully compliant with the CSS Syntax Level 3 specification, providing developers with a robust tool for processing Cascading Style Sheets within Ruby applications. While generally efficient and reliable, versions prior to 1.0.7 contain a specific performance vulnerability related to how the library handles character encoding during parsing operations. This flaw is not a traditional security breach that allows for code execution or data exfiltration but rather represents a significant efficiency issue in resource management that can be exploited to degrade system availability.

The technical root of this vulnerability lies in the internal logic used by Crass to track the positions and lengths of multi-byte characters within input strings. When parsing CSS content, the parser must accurately map character offsets to byte indices, particularly when dealing with non-ASCII characters which often require multiple bytes for representation depending on the encoding scheme such as UTF-8. In affected versions, the algorithm employed to manage these positional tracking metrics exhibits superlinear time complexity relative to the input size. This means that as the volume of non-ASCII content increases, the computational effort required does not grow linearly but rather accelerates at a faster rate, leading to disproportionately high CPU usage for relatively modest amounts of malicious or malformed data.

From an operational perspective, this inefficiency creates a vector for Denial of Service attacks against any service that utilizes Crass to parse user-supplied CSS input without adequate sanitization or resource limits. An attacker can craft a specially constructed CSS payload containing a large number of non-ASCII characters to trigger the inefficient parsing path. Upon processing this input, the application will consume excessive CPU cycles attempting to resolve character positions, potentially causing thread exhaustion, increased latency for legitimate requests, and eventual service unavailability if the server resources are fully depleted by such attacks. This scenario is particularly dangerous in web applications where CSS content might be dynamically generated or influenced by user inputs, even indirectly through template engines or data attributes that allow style injection.

This vulnerability aligns with CWE-400, which describes Uncontrolled Resource Consumption, as the application fails to properly limit the amount of resources consumed during input processing. Furthermore, it relates to CWE-756, Missing Dynamic Resource Allocation Management and Monitoring, because the parser does not efficiently manage memory or CPU allocation relative to the complexity of the encoded string being processed. In terms of offensive security frameworks, this flaw can be leveraged within the MITRE ATT&CK technique T1496, Resource Hijacking, where an attacker uses compromised resources for their own purposes, in this case causing a denial of service by exhausting CPU capacity rather than mining cryptocurrency or other illicit activities.

To mitigate this risk, organizations using Crass must ensure they are running version 1.0.7 or later, which contains the necessary fixes to optimize character position tracking and eliminate the superlinear performance degradation. For environments where upgrading is not immediately feasible, defensive coding practices should be implemented to limit the size of CSS inputs processed by the parser. Implementing strict input validation that rejects excessively large stylesheets or those containing unusual patterns of non-ASCII characters can serve as a temporary buffer against exploitation. Additionally, deploying rate limiting and CPU usage monitoring at the application server level can help detect and mitigate potential abuse attempts before they lead to complete service disruption.

Disclosure

10/30/2026

Moderation

accepted

EPSS

0.00000

KEV

no

Activities

very low

Sources

Want to know what is going to be exploited?

We predict KEV entries!