# GHSA-WWPR-JFF3-395C: Crass: A large number of adjacent CSS comments can trigger a SystemStackError

- Database: GitHub
- Severity: medium (stated by ghsa, no CVSS score)
- Published: 2026-10-29
- Modified: 2026-10-29

## Tracked as

- [CVE-2026-61847](https://cve.now/CVE-2026-61847.md): Crass: A large number of adjacent CSS comments can trigger a SystemStackError

## Affected versions

- crass (RubyGems): fixed in 1.0.7

## 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).

## References

- https://github.com/rgrove/crass/security/advisories/GHSA-wwpr-jff3-395c
- https://github.com/rgrove/crass/commit/25d78cc607c54262e9d43ea1930f3ba5bb03dfb5
- https://github.com/rgrove/crass
- https://github.com/rgrove/crass/releases/tag/v1.0.7

Page: https://cve.now/GHSA-WWPR-JFF3-395C

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
