MediumGHSA-wwpr-jff3-395cCVE-2026-61847

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?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Rails or Ruby apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Affected package

crassRubyGems
Affected
<1.0.7
Fixed in
1.0.7
Update to the fixed version for your release line, for example: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
crass security overview

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.