Crass: A large number of adjacent CSS comments can trigger a SystemStackError
RSS Feed
MODERATE
GHSA-wwpr-jff3-395c
CVE-2026-61847
Description:
Impact
When the :preserve_comments option is not enabled (which is the default behavior), Crass discards CSS comments by recursively consuming the next token. An attacker who provides a stylesheet containing a very large number of adjacent comments can cause excessive recursion and trigger a SystemStackError.
Patches
This is fixed in Crass 1.0.7, which no longer recurses when discarding comments.
Workarounds
Set the :preserve_comments option to true if this is acceptable to your use case (recursion doesn't occur when comments are preserved).
Affected Packages
| Ecosystem | Package | Vulnerable Versions | Patched Version |
|---|---|---|---|
| rubygems |
crass
|
< 1.0.7 |
1.0.7
|
Actions
Advisory Details
| Published: | October 29, 2026 24 days ago |
| Updated: | November 22, 2026 about 20 hours ago |
| CVSS Score: | 6.3 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 |
| EPSS: | 0.45% 40th percentile |
| Source: | Github |
| Classification: | GENERAL |
| UUID: | GSA_kwCzR0hTQS13d3ByLWpmZjMtMzk1Y84AB_9V |
PR Statistics
PR Status
Open
1 (50.0%)
Merged
0 (0.0%)
Closed
1 (50.0%)
Update Types
Patch
2 (100.0%)