Skip to main content

Crass CVE-2026-61847

| EUVDEUVD-2026-114323 MEDIUM
Uncontrolled Recursion (CWE-674)
2026-10-29 https://github.com/rgrove/crass GHSA-wwpr-jff3-395c
6.3
CVSS 4.0 · Vendor: https://github.com/rgrove/crass
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Submit CSS with huge run of adjacent comments
  2. Exploit
    Parser recursively discards each comment token
  3. Execution
    Ruby call stack exhausted (SystemStackError)
  4. Impact
    Parsing 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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.5% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

crass < 1.0.7

Affected Packages

rubygems crass fix: 1.0.7

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

Vendor (https://github.com/rgrove/crass) PRIMARY 6.3 MEDIUM
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
vuln.today AI 5.3 MEDIUM

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.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
Red Hat 7.5 HIGH

Primary rating from Vendor (https://github.com/rgrove/crass).

CVSS VectorVendor: https://github.com/rgrove/crass

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
Low

Lifecycle Timeline

1
CVSS changed
Oct 30, 2026 - 19:23 NVD
6.3 (MEDIUM)

DescriptionCVE.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

EPSS Score
0.5%
Top 58% exploitable
Prevalence
Medium
Ruby CSS parser gem, used as a dependency of popular sanitization libraries
Threat Intel
1
1 source
Data Quality
5 sources
Confidence: Medium
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.5%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

32
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +32
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy