GitHub Advisoryadvisory · RubyGems

GHSA-wwpr-jff3-395c Crass: A large number of adjacent CSS comments can trigger a SystemStackError

MEDIUM Published 2026-10-29 Modified 2026-10-29 Official page ↗
Aliases
CVE-2026-61847
Ecosystem
RubyGems
Packages
crass
Severity
Moderate
CVSS vector
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:L
Weaknesses
CWE-674
Reviewed
2026-10-29

Affected packages

• RubyGems crass: < 1.0.7 → 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).

Related

Alias · CVE (1)

  • CVE-2026-61847 Crass is a Ruby CSS parser that's fully compliant with the CSS Syntax Level 3 specification. vulnerability

Weakness · CWE (1)

  • CWE-674 Uncontrolled Recursion weakness

References