Skip to main content

Crass CVE-2026-61846

| EUVDEUVD-2026-114322 MEDIUM
Uncontrolled Resource Consumption (CWE-400)
2026-10-29 https://github.com/rgrove/crass GHSA-6jxj-px6v-747w
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 deeply nested CSS value
  2. Delivery
    Reach Crass parser via app input path
  3. Exploit
    Unbounded recursion on nested blocks/functions
  4. Execution
    Stack exhaustion or memory blowup
  5. Impact
    SystemStackError disrupts worker

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Resource consumption limits
MITRE ATT&CK

1 technique across 1 tactic: Impact

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires that the embedding application pass attacker-controlled CSS (or content containing CSS, such as user-submitted HTML cleaned via Sanitize) into Crass's parser on a version prior to 1.0.7, where no nesting depth guard exists by default. The trigger is specifically input with simple blocks or functions nested far more deeply than legitimate CSS requires. Limiting factors: the flaw is not reachable if the application never parses untrusted CSS; it is mitigated if the application already wraps Crass calls in SystemStackError handling; and on patched (>= 1.0.7) deployments the default :maximum_depth of 25 discards over-deep constructs as an :error node, so only explicitly raising :maximum_depth reintroduces risk.

Impact

This is a moderate-severity availability issue, not a high-urgency emergency. No CVSS score or vector is provided by any source, so severity must be assessed independently; the vendor's own HISTORY.md rates it 'Moderate'. There is no EPSS score, no CISA KEV listing, and no PoC/exploit reference in the input, so this is not confirmed actively exploited and no public exploit identified at time of analysis. The vuln.today Decision label is 'this_month' (not act_now or emergency), which is consistent with a denial-of-service-only flaw (CWE-400) that cannot yield code execution, data disclosure, or integrity loss. The real-world risk is genuinely gated by deployment: Crass is a library, so exploitability depends on whether the embedding application feeds attacker-controlled CSS into the parser (a common pattern when Crass is used transitively via the Sanitize gem to clean user-submitted HTML/CSS). Where that pattern exists and no SystemStackError rescue is present, a single crafted input can crash a request worker; where untrusted CSS is never parsed, practical risk is negligible. Note the absence of any CVSS vector in the input means the attack-vector and privilege characterization below is inferred from the description and typical usage, not confirmed by a scoring authority.

Exploit ScenarioDerived

An attacker submits a value containing many deeply nested CSS simple blocks or functions (e.g. thousands of nested '{' or '(' delimiters) to an application that parses untrusted CSS with Crass - for instance an HTML/CSS sanitization path. Crass recurses without a depth guard until Ruby raises SystemStackError 'stack level too deep' or consumes excessive memory, disrupting the handling request or worker. No public exploit is identified at time of analysis, though crafting the triggering input is trivial.

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

Deeply nested CSS simple blocks and functions parsed by the Crass Ruby gem before version 1.0.7 can exhaust the Ruby interpreter stack and raise SystemStackError: stack level too deep, or drive disproportionate memory consumption, giving unauthenticated remote attackers a limited denial-of-service condition (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L). Only applications that feed attacker-controlled CSS - or content containing CSS, such as user-submitted HTML sanitized with Sanitize - into Crass's parser on versions prior to 1.0.7 are exposed, and the trigger requires nesting far deeper than legitimate stylesheets produce; parsing is safe if untrusted CSS never reaches the library. No public exploit code or PoC was identified at time of analysis and the issue has not been confirmed actively exploited (CISA KEV); vendor-released patch: 1.0.7.

RemediationAI

Upgrade the crass gem to 1.0.7 or later (vendor-released patch: 1.0.7), which introduces the :maximum_depth parsing option with a conservative default of 25 and converts over-deep constructs into an :error node rather than recursing further; the change is in commit https://github.com/rgrove/crass/commit/cf68287356ec6e20d51cfc4a2d0c3912b7334e99 and the release is at https://github.com/rgrove/crass/releases/tag/v1.0.7, with the advisory at https://github.com/rgrove/crass/security/advisories/GHSA-6jxj-px6v-747w. Do not raise :maximum_depth above the default unless a specific stylesheet corpus demonstrably requires it, since doing so re-opens the stack-exhaustion path. Where upgrading is not immediately possible, the vendor's documented workaround is to wrap Crass calls in explicit SystemStackError handling in the calling application, accepting that the parse still aborts and the surrounding request may still fail; the vendor also notes additional RAM as a palliative for the memory dimension only, which does not address stack exhaustion and is not a real mitigation. Reducing the surface by refusing to pass untrusted CSS into Crass at all - for example, rejecting or truncating input whose nesting depth exceeds a pre-check limit before parsing - limits exposure but duplicates parsing logic and can be bypassed by obfuscated CSS, so it is a stopgap rather than a fix.

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 is a pure-Ruby CSS parser (CPE pkg:rubygems/crass) implemented as a recursive-descent parser mirroring the CSS Syntax specification, with consume_rules handling simple blocks and consume_declarations handling functions. Because recursion in this design follows input nesting directly, the depth of the Ruby call stack is attacker-influenced; with no depth guard an input containing thousands of nested blocks or functions reaches the interpreter's stack limit and raises SystemStackError, an exception class under which ordinary rescue blocks do not catch it. The class is CWE-400 (Uncontrolled Resource Consumption): the root cause is unbounded recursion without a nesting cap, and the fix commit cf68287356ec6e20d51cfc4a2d0c3912b7334e99 adds a @depth counter incremented on entry to block and function parsing and restored in an ensure clause. When @depth exceeds the new :maximum_depth option (DEFAULT_MAXIMUM_DEPTH = 25), the over-deep construct is discarded via discard_block and emitted as an :error node with the value "maximum-depth-exceeded". The commit message notes a secondary memory dimension: each nested simple block or function retains a :tokens array spanning its descendants for serialization, so serialization metadata grows with nesting depth and a modest cap also bounds that amplification. The default of 25 is described as far higher than any legitimate CSS needs but far below the depth at which Ruby would raise SystemStackError.

Know when Ruby gets its next vulnerability

  • 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

Attacker-supplied CSS is typically reachable over the network without auth (AV:N/PR:N/UI:N); impact is availability-only and partial since SystemStackError is rescuable (C:N/I:N/A:L).

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 5.3 MEDIUM

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

Crass recursively parses CSS simple blocks and functions without a depth guard. An attacker-controlled value containing many deeply nested blocks can recurse until Ruby raises SystemStackError: stack level too deep, or can cause excessive memory usage.

Patches

This is fixed in Crass 1.0.7, which adds a configurable depth limit with a conservative default.

Workarounds

Add SystemStackError handling around Crass calls in your application. Buy more RAM.

Threat Intelligence Overview

EPSS Score
0.5%
Top 58% exploitable
Prevalence
Medium
Common Ruby CSS parser library, notably a dependency of the Sanitize gem
Threat Intel
1
1 source
Data Quality
5 sources
Confidence: Medium

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· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact· derived
Medium

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.

More in Ruby

View all
CVE-2017-17405 HIGH POC
8.8 Dec 15

Ruby before 2.4.3 allows Net::FTP command injection. Rated high severity (CVSS 8.8), this vulnerability is remotely expl

CVE-2017-17790 CRITICAL POC
9.8 Dec 20

The lazy_initialize function in lib/resolv.rb in Ruby through 2.4.3 uses Kernel#open, which might allow Command Injectio

CVE-2017-14064 CRITICAL POC
9.8 Aug 31

Ruby through 2.2.7, 2.3.x through 2.3.4, and 2.4.x through 2.4.1 can expose arbitrary memory during a JSON.generate call

CVE-2016-2336 CRITICAL POC
9.8 Jan 06

Type confusion exists in two methods of Ruby's WIN32OLE class, ole_invoke and ole_query_interface. Rated critical severi

CVE-2026-77602 CRITICAL POC
9.9 Sep 23

Authenticated remote code execution in OpenC3 COSMOS (Ruby gem 'openc3' versions 5.1.0 through 7.2.1) lets any logged-in

CVE-2016-2337 CRITICAL POC
9.8 Jan 06

Type confusion exists in _cancel_eval Ruby's TclTkIp class method. Rated critical severity (CVSS 9.8), this vulnerabilit

CVE-2016-2339 CRITICAL POC
9.8 Jan 06

An exploitable heap overflow vulnerability exists in the Fiddle::Function.new "initialize" function functionality of Rub

CVE-2017-9225 CRITICAL POC
9.8 May 24

An issue was discovered in Oniguruma 6.2.0, as used in Oniguruma-mod in Ruby through 2.4.1 and mbstring in PHP through 7

CVE-2026-44266 CRITICAL POC
9.8 Nov 03

Ruby code execution in Elo (npm @enspirit/elo) through 1.0.0 lets an attacker who controls Elo source gain arbitrary Rub

CVE-2026-27614 CRITICAL POC
9.3 Feb 25

Stored XSS in Bugsink error tracking tool before 2.0.13 allows unauthenticated attackers to inject persistent scripts th

CVE-2017-0898 CRITICAL POC
9.1 Sep 15

Ruby before 2.4.2, 2.3.5, and 2.2.8 is vulnerable to a malicious format string which contains a precious specifier (*) w

CVE-2013-4164 MEDIUM POC
6.8 Nov 23

Heap-based buffer overflow in Ruby 1.8, 1.9 before 1.9.3-p484, 2.0 before 2.0.0-p353, 2.1 before 2.1.0 preview2, and tru

Vendor StatusVendor

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