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

Published Oct 29, 2026
·
Updated

Impact

Crass recursively parses CSS simple blocks and functions without a depth guard. An attacker-controlled value containing many deeply nested blocks can recurse until Ruby raises SystemStackError: stack level too deep, or can cause excessive memory usage.

Patches

This is fixed in Crass 1.0.7, which adds a configurable depth limit with a conservative default.

Workarounds

Add SystemStackError handling around Crass calls in your application. Buy more RAM.

Affected Software

1 affected componentFixes available
rubygems/crass<1.0.7
1.0.7

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade rubygems/crass to a version that resolves this vulnerability.

    Fixed in 1.0.7
  2. Upgrade

    Upgrade Crass to a version that resolves this vulnerability.

    Fixed in 1.0.7
  3. Compensating control

    Add SystemStackError handling around Crass calls in the application.

Event History

Oct 29, 2026
Advisory Published
via GitHub·04:35 PM
Data Sourced
via GitHub·04:35 PM
DescriptionWeaknessAffected Software
Data Sourced
via OSV·04:35 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Who is exposed to this issue?

Applications using the Crass Ruby gem are exposed when they parse attacker-controlled CSS values. An unauthenticated remote attacker can supply deeply nested CSS blocks or functions to trigger the condition.

2

What is required to exploit the vulnerability?

The attacker needs to provide a CSS value with many deeply nested simple blocks or functions. No authentication or user interaction is required, but exploitation depends on the application passing attacker-controlled CSS to Crass.

3

Are default deployments affected?

Versions before Crass 1.0.7 do not have the depth guard described in the advisory. Crass 1.0.7 adds a configurable depth limit with a conservative default.

4

What can be done if upgrading is not immediately possible?

Add SystemStackError handling around calls to Crass to prevent an unhandled stack exhaustion error. The advisory also notes that deeply nested input can consume excessive memory, so this handling does not eliminate the memory-usage risk.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203