Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit CSS with huge run of adjacent comments
-
ExploitParser recursively discards each comment token
-
ExecutionRuby call stack exhausted (SystemStackError)
-
ImpactParsing request crashes / denial of service
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Recursion depth limits
|
| Exploitation Conditions | The consuming application must use Crass (< 1.0.7) to parse attacker-supplied CSS with the default configuration - specifically with :preserve_comments NOT enabled (false), which is the default. The attacker supplies a stylesheet containing a very large number of adjacent CSS comments (crash observed empirically above ~12,000 comments). LIMITING FACTORS: exploitation is avoided entirely by setting :preserve_comments => true (recursion does not occur when comments are preserved) or by upgrading to 1.0.7; the application must actually pass untrusted CSS through Crass; and the resulting SystemStackError is a catchable Ruby exception, limiting impact to a parse-time crash rather than lasting corruption. |
| Impact | This is a denial-of-service vulnerability (CWE-674, uncontrolled recursion) in the Crass Ruby CSS parser, not an information-disclosure issue as the input tag suggests. No CVSS score or vector was supplied by the input, so attack-vector, complexity, and privilege signals must be inferred from the description rather than confirmed. There is no EPSS score, no CISA KEV listing, and no verified public exploit reference in the provided data - the regression test in the patch commit demonstrates the crash internally but is not published exploit code. The vuln.today decision label is 'this_month', consistent with a moderate-severity availability bug rather than an emergency. Real-world risk is bounded: the impact is a recoverable SystemStackError (a thrown Ruby exception, not memory corruption or code execution), and exploitation requires that the consuming application feed attacker-controlled CSS to Crass under its default (comments-discarded) configuration. The vendor itself rates this Moderate. Net: a genuine but low-to-moderate DoS, worth patching on a normal cycle; it is not a high-urgency, actively-exploited threat on the available evidence. |
| Exploit ScenarioDerived | An application that uses Crass (directly or via a CSS/HTML sanitizer) to parse user-supplied stylesheets under the default configuration accepts a stylesheet consisting of a very large run of adjacent comments (crash observed empirically above roughly 12,000 comments). Crass discards each comment by recursively consuming the next token, so the long run exhausts the Ruby call stack and raises SystemStackError, aborting the parse. No public, verified exploit code is identified at time of analysis, though the mechanism is fully described in the advisory. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 29, 2026
Crass, a pure-Ruby CSS parser distributed as the rubygems package crass, discards CSS comments recursively when the :preserve_comments option is left at its default (disabled), so a stylesheet containing a very long run of adjacent comments drives unbounded recursion and raises a SystemStackError, crashing the parse. All releases below 1.0.7 are affected, and any application that passes attacker-controlled CSS through Crass in its default configuration is exposed to a low-impact availability loss (assessed CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L); the crash threshold was empirically observed above roughly 12,000 adjacent comments. No public exploit code was identified at time of analysis, and a vendor-released patch ships in Crass 1.0.7.
RemediationAI
Vendor-released patch: Crass 1.0.7, which no longer recurses when discarding comments (commit 25d78cc607c54262e9d43ea1930f3ba5bb03dfb5); upgrade the crass gem to 1.0.7 or later and confirm the resolved version in your Gemfile.lock, since transitive dependencies may pin an older release. If immediate upgrade is not possible, the vendor's documented workaround is to set :preserve_comments => true when calling the tokenizer/parser, because recursion does not occur on that path; the trade-off is that comment tokens are then retained in the output, which changes parse results for consumers that expect comments to be discarded and increases memory use proportional to the number of comments. Because the trigger is a large run of adjacent comments delivered through attacker-supplied CSS, limiting the size and comment density of untrusted stylesheets accepted by the consuming application also reduces exposure until the gem is upgraded. Advisory: https://github.com/rgrove/crass/security/advisories/GHSA-wwpr-jff3-395c.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in rubygems
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Crass implements the CSS Syntax Level 3 tokenizer and parser in pure Ruby, and its tokenizer exposes a :preserve_comments option that controls whether comment tokens are surfaced to callers. CWE-674 (uncontrolled recursion) is the root cause: in lib/crass/tokenizer.rb, the routine that consumes the next token checked for a leading comment and, when :preserve_comments was false, discarded it and simply called itself again via consume, so each adjacent comment added a stack frame. Because the number of frames scaled linearly with the number of consecutive comments, a single crafted stylesheet containing tens of thousands of '/**/' sequences exhausted the Ruby stack and raised SystemStackError. The upstream fix (commit 25d78cc607c54262e9d43ea1930f3ba5bb03dfb5) replaces that recursion with a loop that skips consecutive comments iteratively and only returns early when comments are being preserved, and the accompanying regression tests use 50,000 adjacent comments, well above the observed crash threshold. Note that the input's 'Information Disclosure' tag does not match the assessed impact: the flaw yields a parse-time denial of service only, with no confidentiality or integrity effect.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
A remote attacker supplies untrusted CSS to a parser with no auth or user interaction (AV:N/AC:L/PR:N/UI:N); only availability is affected via a recoverable stack-exhaustion crash (A:L), no C/I impact.
Primary rating from Vendor (https://github.com/rgrove/crass).
CVSS VectorVendor: https://github.com/rgrove/crass
Lifecycle Timeline
1DescriptionCVE.org
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).
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
EUVD-2026-114323
GHSA-wwpr-jff3-395c
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB