
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-61847 is an uncontrolled recursion vulnerability in the Crass CSS parser (RubyGem) that allows a remote attacker to trigger a SystemStackError (stack overflow) by supplying a stylesheet containing a very large number of adjacent CSS comments. It affects all Crass versions prior to 1.0.7 and is exploitable only when the :preserve_comments option is disabled, which is the default behavior. The vulnerability was originally published by maintainer rgrove on June 25, 2026, and added to the GitHub Advisory Database on October 29, 2026. It carries a CVSS v4 base score of 6.3 (Medium) (GitHub Advisory, Crass Advisory).
The root cause is classified as CWE-674 (Uncontrolled Recursion). In the affected versions, the consume method in lib/crass/tokenizer.rb handles discarded CSS comments by recursively calling itself to consume the next token; each adjacent comment adds one stack frame, and a sufficiently long sequence (empirically observed crash threshold around 12,000 comments) exhausts the Ruby call stack and raises a SystemStackError. The fix in commit 25d78cc replaces the recursive call with an iterative loop construct, eliminating the stack growth entirely. No authentication or special privileges are required — an attacker only needs to be able to supply a CSS stylesheet to an application that parses it with Crass using default settings (GitHub Advisory, Fix Commit).
Successful exploitation causes the Ruby process parsing the malicious stylesheet to crash with a SystemStackError, resulting in a denial of service for the affected application. There is no impact on confidentiality or integrity — the vulnerability is purely an availability issue. Applications that process untrusted user-supplied CSS (e.g., web applications accepting custom stylesheets or themes) are most at risk, and repeated exploitation could keep a service unavailable (GitHub Advisory, Crass Advisory).
No public proof-of-concept exploit code or in-the-wild exploitation has been reported for CVE-2026-61847. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog, and no threat actor attribution is available. Exploitation is straightforward in concept — crafting a payload requires only generating a CSS string with thousands of adjacent /**/ comment tokens — but requires the attacker to control input to a Crass-parsing endpoint (GitHub Advisory).
:preserve_comments option (i.e., comments are discarded).'/**/' * 50_000.consume for each adjacent comment, exhausting the Ruby call stack and raising a SystemStackError, crashing the parsing process and causing a denial of service (GitHub Advisory, Fix Commit).SystemStackError exceptions originating from crass/tokenizer.rb in the consume method stack trace./**/ sequences) to stylesheet-processing endpoints.Upgrade Crass to version 1.0.7 or later, which replaces the recursive comment-discarding logic with an iterative approach, fully resolving the vulnerability (Crass Release). As an immediate workaround without upgrading, set the :preserve_comments option to true when invoking the parser — this prevents the recursive code path from being triggered, though it changes parsing behavior by retaining comments in the output (Crass Advisory). Applications that do not process untrusted CSS input are not at risk.
Fix availability across major Linux distributions and their releases.
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."