RubyGems
CVE-2026-61847
Crass: A large number of adjacent CSS comments can trigger a SystemStackError
- Severity
- Medium
- Published
- 29 Oct 2026
- Last changed
- 29 Oct 2026
- Added to UpHeron
- 23 Nov 2026
- Fixed in
- 1.0.7
- Exploit chance
- 0.5% in the next 30 daysHigher than 39% of CVEs. EPSS by FIRST, 24 Nov 2026
- Weakness
- Uncontrolled recursion (CWE-674)
- Also known as
- GHSA-wwpr-jff3-395c
- Sources
- OSV.dev and GitHub
Description
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.
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 software
| Software | Affected versions |
|---|---|
crassRubyGems · osv:RubyGems:crass |
|
About crass
- Total downloads (RubyGems)
- 649,854,345RubyGems, 23 Nov 2026
Vulnerabilities in crass
- In our list
- 4
- Published in the last 12 months
- 4
- Critical, last 12 months
- 0
- High, last 12 months
- 0
- Known exploited
- 0
- CVE-2026-61848Crass: Non-ASCII characters cause superlinear CPU consumptionMedium 29 Oct 2026
- CVE-2026-61846Crass: Deeply nested CSS blocks and functions can trigger a SystemStackError or excessive memory usageMedium 29 Oct 2026
- CVE-2026-116695Crass: Incorrect tokenization of bad URLs enables CSS sanitizer bypassMedium 28 Oct 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-61847
- GitHub Advisory Database https://github.com/advisories/GHSA-wwpr-jff3-395c