Crass denial of service in CSS comment parsing
rgrove crass
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| crass RubyGems |
|
|
Original description
Crass is a Ruby CSS parser that's fully compliant with the CSS Syntax Level 3 specification. Prior to 1.0.7, when the `:preserve_comments` option is not enabled, which is the default, Crass discards CSS comments by recursively consuming the next token. An attacker-provided stylesheet containing a very large number of adjacent comments can cause excessive recursion and trigger a `SystemStackError`, denying service to the parsing application. Preserving comments avoids this recursive path. This issue is fixed in version 1.0.7.
From the CVE record · GitHub_M