All reports
Medium

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

Affected versions

Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported
RubyGemscrass
Affected versions
< 1.0.7
Fixed version
1.0.7

Exploitation

CVE-2026-61846

Probability of exploitation in the next 30 days: 0.45%

FIRST EPSS · 2026-11-23

Description

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.

Links

Credits

  • hourianto
  • rgrove