Crass: A large number of adjacent CSS comments can trigger a SystemStackError
Published 29 Oct 2026 · Updated 29 Oct 2026
Is your project on an affected crass?
Look after several Rails or Ruby apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected package
- Affected
- <1.0.7
- Fixed in
- 1.0.7
bundle update --conservative crass # Gemfile: '>= 1.0.7'Details
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).
Is GHSA-wwpr-jff3-395c in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected crass, and gives you the command that fixes it.
More advisories for crass
- MediumCVE-2026-61848Crass: Non-ASCII characters cause superlinear CPU consumption · 29 Oct 2026
- MediumCVE-2026-61846Crass: Deeply nested CSS blocks and functions can trigger a SystemStackError or excessive memory usage · 29 Oct 2026
- MediumCVE-2026-116695Crass: Incorrect tokenization of bad URLs enables CSS sanitizer bypass · 28 Oct 2026
- HighCVE-2026-61845Crass : Large numeric exponents cause CPU and memory denial of service · 20 Oct 2026
References
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.