All vulnerabilities

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.

From the GitHub Advisory Database, CC BY 4.0.

Workarounds

Set the :preserve_comments option to true if this is acceptable to your use case (recursion doesn't occur when comments are preserved).

Workarounds as given by the GitHub Advisory Database, CC BY 4.0.

Affected software

SoftwareAffected versions
crassRubyGems · osv:RubyGems:crass
  • Every version before 1.0.7

About crass

Total downloads (RubyGems)
649,854,345RubyGems, 23 Nov 2026

References