GHSA-wwpr-jff3-395c
Dashboard / Vulnerabilities / GHSA-wwpr-jff3-395c
Summary: Crass: A large number of adjacent CSS comments can trigger a SystemStackError
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).
References: https://github.com/rgrove/crass/security/advisories/GHSA-wwpr-jff3-395c, https://github.com/rgrove/crass/commit/25d78cc607c54262e9d43ea1930f3ba5bb03dfb5, https://github.com/rgrove/crass, https://github.com/rgrove/crass/releases/tag/v1.0.7
Affected packages
Package
Name: crass
Purl: pkg:gem/crass
Affected ranges
Type: ECOSYSTEM
Events:
