CVE-2026-61847

Crass: A large number of adjacent CSS comments can trigger a SystemStackError

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, when the `:preserve_comments` option is not enabled, which is the default, Crass discards CSS comments by recursively consuming the next token. An attacker-provided stylesheet containing a very large number of adjacent comments can cause excessive recursion and trigger a `SystemStackError`, denying service to the parsing application. Preserving comments avoids this recursive path. This issue is fixed in version 1.0.7.

Analysis

AI-generated

Technical impact

Crass is a Ruby CSS parser that, before version 1.0.7, discards CSS comments by recursively consuming the next token. When presented with a stylesheet that contains a very large number of adjacent comments, the parser performs excessive recursion and triggers a SystemStackError, which causes the host application to crash. This flaw results in a denial of service condition for any process that processes untrusted CSS with Crass without comment preservation. The weakness is an instance of uncontrolled recursion (CWE-674). The likely attack vector is an attacker supplying a stylesheet that contains many adjacent comments to the parser.

Affected Systems

The vulnerability affects the Ruby library Crass supplied by the vendor rgrove. Any Ruby application that uses Crass with a version earlier than 1.0.7 and does not enable the :preserve_comments option is impacted. Upgrading to 1.0.7 or newer removes the problem, as the parser no longer uses the recursive comment consumption path.

Risk and Exploitability

The CVSS score of 6.3 indicates moderate severity. An EPSS score is not available, so the current likelihood of exploitation is unknown. The vulnerability is not listed in the CISA KEV catalogue. The attack is inferable from the description: an attacker can trigger the denial of service by injecting a stylesheet with a large number of comments into any application that parses CSS with Crass without comment preservation. Because the flaw can be triggered by any untrusted CSS input, an attacker who can provide such input has a direct path to cause a SystemStackError and bring the application down. The defense is to upgrade to the patched version or enable the :preserve_comments option. While no exploit has been reported publicly, the moderate CVSS score and lack of evidence of widespread exploitation suggest the risk is significant but not immediate.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Crass to version 1.0.7 or newer to eliminate the recursive comment consumption path.
  • If upgrading cannot be performed immediately, configure Crass with the :preserve_comments option so that comments are not recursively consumed and the recursion flaw is bypassed.
  • Audit any code paths that pass externally supplied CSS to Crass and apply input size limits, sandboxing, or other denial of service mitigation controls to contain potential memory exhaustion.

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

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-wwpr-jff3-395c Crass: A large number of adjacent CSS comments can trigger a SystemStackError
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
Weaknesses CWE-770
References
Metrics threat_severity

None

cvssV3_1

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

threat_severity

Important

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, when the `:preserve_comments` option is not enabled, which is the default, Crass discards CSS comments by recursively consuming the next token. An attacker-provided stylesheet containing a very large number of adjacent comments can cause excessive recursion and trigger a `SystemStackError`, denying service to the parsing application. Preserving comments avoids this recursive path. This issue is fixed in version 1.0.7.
Title Crass: A large number of adjacent CSS comments can trigger a SystemStackError
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
Oct 30, 2026, 10:15 PM
Reserved
Jul 10, 2026, 8:28 PM
Status
Deferred
Published
Oct 30, 2026, 7:18 PM
Modified
Oct 30, 2026, 11:17 PM
Severity
Important
Public date
Oct 30, 2026, 6:44 PM