CVE-2026-61846

Crass: Deeply nested CSS blocks and functions can trigger a SystemStackError or excessive memory usage

Published Oct 30, 2026 CVSS 4.0 · 6.3 Medium EPSS < 1% KEV · Not listed
Description
Crass is a Ruby CSS parser that's fully compliant with the CSS Syntax Level 3 specification. Prior to 1.0.7, Crass recursively parses `CSS simple blocks and functions` without a depth guard. An attacker-controlled CSS value containing deeply nested blocks or functions can recurse until Ruby raises `SystemStackError`: stack level too deep, or cause excessive memory usage. Version 1.0.7 adds a configurable depth limit with a conservative default. This issue is fixed in version 1.0.7.

Analysis

AI-generated

Technical impact

Crass parses CSS recursively without a depth guard until version 1.0.7. An input containing deeply nested blocks or functions causes Ruby to raise a SystemStackError or consume excessive memory, crashing the interpreter or exhausting system resources. This can terminate services that depend on the parser, leading to a denial of service. The weakness is an unchecked recurrence that fits CWE-674.

Affected Systems

The vulnerability affects the Crass CSS parser delivered by rgrove. Any installation using Crass version 1.0.6 or earlier is vulnerable. Versions 1.0.7 and later contain a configurable depth limit that mitigates the issue.

Risk and Exploitability

The likely attack vector is an attacker delivering a malicious CSS value containing deeply nested blocks or functions. The CVSS score of 6.3 indicates moderate severity. The EPSS score is not available, and the flaw is not listed in CISA KEV, suggesting it may not be actively exploited yet. However, if an application accepts user‑supplied CSS that reaches Crass, the recursion can be triggered, causing Ruby to raise a SystemStackError or consume excessive memory, potentially crashing the interpreter or exhausting system resources. Because the parser lacks an explicit depth guard, an attacker can trigger the recursion by simply supplying an overly complex style sheet, making exploitation straightforward once the vulnerable parser is reached.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Crass to version 1.0.7 or later, which introduces a depth limit guard.
  • If an upgrade cannot be performed immediately, configure the depth limit to a lower value in Crass 1.0.7 (or later) to reduce recursion depth before parsing; note that older versions lack this option.
  • Validate or sanitize incoming CSS to reject highly nested blocks or functions before they are passed to the parser, providing a temporary safety net while a proper update is deployed.

Generated by OpenCVE AI on October 31, 2026 at 02:06 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-6jxj-px6v-747w Crass: Deeply nested CSS blocks and functions can trigger a SystemStackError or excessive memory usage
History
Type Values Removed Values Added
Metrics ssvc

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

Type Values Removed Values Added
Weaknesses CWE-770
References
Metrics threat_severity

None

cvssV3_1

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

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's fully compliant with the CSS Syntax Level 3 specification. Prior to 1.0.7, Crass recursively parses `CSS simple blocks and functions` without a depth guard. An attacker-controlled CSS value containing deeply nested blocks or functions can recurse until Ruby raises `SystemStackError`: stack level too deep, or cause excessive memory usage. Version 1.0.7 adds a configurable depth limit with a conservative default. This issue is fixed in version 1.0.7.
Title Crass: Deeply nested CSS blocks and functions can trigger a SystemStackError or excessive memory usage
Weaknesses CWE-674
References
Metrics cvssV4_0

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

Weaknesses
  • CWE-674

    Uncontrolled Recursion

  • CWE-770

    Allocation of Resources Without Limits or Throttling

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Nov 5, 2026, 2:28 AM
Reserved
Jul 10, 2026, 8:28 PM
Status
Deferred
Published
Oct 30, 2026, 7:18 PM
Modified
Nov 5, 2026, 3:17 AM
Severity
Moderate
Public date
Oct 30, 2026, 6:43 PM