{"id":"CVE-2026-61847","aliases":["CVE-2026-61847","GHSA-wwpr-jff3-395c"],"related":[],"kind":"vulnerability","state":"published","title":"Crass: A large number of adjacent CSS comments can trigger a SystemStackError","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nWhen 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`.\n\n### Patches\n\nThis is fixed in Crass 1.0.7, which no longer recurses when discarding comments.\n\n### Workarounds\n\nSet the `:preserve_comments` option to `true` if this is acceptable to your use case (recursion doesn't occur when comments are preserved).","format":"markdown","source":"ghsa"}],"published":"2026-10-29T16:35:23.000Z","modified":"2026-10-30T23:17:12.003Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","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","score":6.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","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","score":6.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","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","rating":"MEDIUM"}],"cwes":["CWE-674"],"affected":[{"ranges":[{"version":"< 1.0.7","status":"affected"}],"vendor":"rgrove","product":"crass","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.0.7"}],"ecosystem":"RubyGems","package":"crass","purl":"pkg:gem/crass","source":"ghsa"}],"references":[{"url":"https://github.com/rgrove/crass/security/advisories/GHSA-wwpr-jff3-395c","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/rgrove/crass/commit/25d78cc607c54262e9d43ea1930f3ba5bb03dfb5","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/rgrove/crass/releases/tag/v1.0.7","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/rgrove/crass","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-10-30T21:18:11.231Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-61847","url":"https://www.cve.org/CVERecord?id=CVE-2026-61847","licence":"CVE Terms of Use","modified":"2026-10-30T22:15:42.844Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-wwpr-jff3-395c","url":"https://github.com/advisories/GHSA-wwpr-jff3-395c","licence":"CC-BY-4.0","modified":"2026-10-29T16:45:06.064Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-61847","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-61847","licence":"Public domain","modified":"2026-10-30T23:17:12.003Z"}],"updatedAt":"2026-11-25T22:59:48.000Z","epss":{"score":0.00454,"percentile":0.41108,"date":"2026-12-01T12:00:22.000Z"}}