Skip to main content

Crass CVE-2026-61845

HIGH
Uncontrolled Recursion (CWE-674)
2026-10-20 https://github.com/rgrove/crass GHSA-6wmf-3r64-vcwv
View

Attack ChainAIDerived

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

  1. Access
    Submit CSS with huge scientific-notation exponent
  2. Exploit
    Crass evaluates unbounded 10**exponent
  3. Execution
    CPU/memory exhaustion before clamp
  4. Impact
    Process slowdown or crash (DoS)

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Recursion depth limits
Exploitation Conditions

Exploitation requires that the consuming application pass attacker-controlled CSS strings to Crass's parser (any code path that tokenizes/parses untrusted CSS, such as CSS sanitization of user input); the malicious input must contain a CSS number in scientific notation with a very large exponent. There is no authentication, user interaction, or special Crass configuration required by the library itself - the limiting factor is entirely whether the application exposes a CSS-parsing path to untrusted input. Applications that only parse trusted/static CSS are not realistically exposed. Affected versions are Crass < 1.0.7.

Impact

No CVSS vector, EPSS score, KEV listing, or public POC is provided in the input, so quantitative exploitation signals are entirely absent and cannot be compared or contrasted. The only authoritative severity signal is the vendor's own release note, which rates this a 'High' denial-of-service issue (CWE-674, uncontrolled resource consumption). On its own technical merits this is a genuine but bounded risk: Crass is a CSS parsing library, and the flaw is only reachable when an application feeds attacker-controlled CSS to the parser, where a tiny input (a large scientific-notation exponent) triggers unbounded 10**exponent computation before clamping to Float::MAX, consuming disproportionate CPU/memory and possibly crashing the process. This is an availability-only issue - there is no confirmed confidentiality or integrity impact. It is not confirmed as actively exploited (no public exploit identified at time of analysis), so despite the vendor 'High' rating this should be treated as a patch-promptly dependency-hygiene item rather than an emergency, weighted by how exposed the consuming application's CSS-parsing path is to untrusted input. Note: the absence of EPSS/KEV/POC reflects missing input data, not a verified low real-world interest level.

Exploit ScenarioDerived

An attacker submits a small CSS string containing a numeric value in scientific notation with a very large exponent (e.g. a value like '1e99999999') to a web application that uses Crass to parse or sanitize user-supplied CSS. Crass evaluates 10**exponent before clamping to Float::MAX, so the single short input forces the server to spend disproportionate CPU and memory, degrading or crashing the process and denying service to other users. No public exploit code is identified at time of analysis, but the triggering input is trivial to construct from the public advisory description.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available

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

Alert me

AnalysisAIv1 – Oct 20, 2026

Denial of service in Crass before 1.0.7 can be triggered when an application parses attacker-controlled CSS containing a scientific-notation number with an excessively large exponent, causing disproportionate CPU and memory consumption and possibly a crash. The library itself requires no authentication, user interaction, or special configuration once untrusted CSS reaches the parser, but exposure depends entirely on whether the consuming application exposes a CSS-parsing path to untrusted input; applications that only parse trusted or static CSS are not realistically exposed. No public exploit code, EPSS score, or CISA KEV listing was provided, so no public exploit identified at time of analysis and there is no confirmed active exploitation signal.

RemediationAI

Vendor-released patch: 1.0.7. Upgrade the crass gem to 1.0.7 or later, and verify the dependency lockfile resolves to the fixed version; the vendor advisory is at https://github.com/rgrove/crass/security/advisories/GHSA-6wmf-3r64-vcwv and the fixed release is at https://github.com/rgrove/crass/releases/tag/v1.0.7. If an immediate upgrade is not possible, ensure Crass never receives attacker-controlled CSS by parsing only trusted or static stylesheets, or sanitize and normalize CSS before parsing by rejecting or rewriting scientific-notation numeric tokens with large exponents; this may reject legitimate CSS and requires maintaining a parser-adjacent filter. As a containment measure, run CSS parsing in an isolated worker or process with CPU, memory, and wall-clock limits so a malicious stylesheet exhausts the worker rather than the application; this adds operational complexity and can still cause localized denial of service.

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 Ruby gem that tokenizes and parses CSS. The parser converts CSS scientific-notation number values by computing a power of ten before clamping the result to Float::MAX; a very large exponent makes 10**exponent consume disproportionate CPU and memory from a tiny input. The assigned CWE-674 (Uncontrolled Recursion) frames this as a resource-exhaustion class, while the concrete mechanism is resource exhaustion during numeric conversion in number parsing. The CPE pkg:rubygems/crass identifies the RubyGems package, and the vulnerable range is versions before 1.0.7; version 1.0.7 fixes the issue by bounding exponents before the exponentiation is computed.

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

vuln.today AI 7.5 HIGH

Attacker-controlled CSS is typically delivered remotely (AV:N) with a trivial input and no auth or interaction (AC:L/PR:N/UI:N); impact is availability-only resource exhaustion (A:H, C/I:N).

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

Estimated by vuln.today — no official severity rating has been published for this CVE yet.

DescriptionCVE.org

Impact

Crass converts CSS scientific notation number values with unbounded exponentiation before it clamps the result to Float::MAX. Applications that use Crass to parse attacker-controlled CSS strings can be forced to spend disproportionate CPU and memory parsing a tiny input, possibly resulting in a crash.

Patches

This is fixed in Crass 1.0.7.

Related

  • https://github.com/rubysec/ruby-advisory-db/blob/master/gems/crass/GHSA-6wmf-3r64-vcwv.yml

Technical POC Analysis

Assigned weakness: CWE-674 (Uncontrolled Recursion) per the CVE record.

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

The Crass CSS parsing library, used widely across Ruby and Rails asset, sanitization, and email-rendering pipelines, can be driven into disproportionate CPU and memory consumption by a crafted stylesheet, creating an availability risk for any service that feeds it untrusted CSS. Exposure is entirely conditional: teams that only parse static or trusted stylesheets carry little practical risk, while those exposing a parsing path to user-supplied content inherit the full denial-of-service surface. No public exploit code, no exploitation telemetry, and no confirmed active exploitation were identified, so leadership should treat this as a forward-looking resilience issue rather than an active incident.

Business Impact: Medium
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: refuse to pass untrusted or user-supplied CSS into Crass and restrict parsing to trusted, static, or pre-validated stylesheets; enforce hard input-size and token-length limits and pre-screen stylesheets for excessively large numeric exponents before parsing; run the parser in an isolated worker or subprocess with CPU-time and memory caps plus execution timeouts so a pathological stylesheet cannot exhaust shared resources; and rate-limit and monitor any endpoint that accepts CSS or HTML that eventually reaches the parser.

Threat Intelligence Overview

Prevalence
Medium
Ruby CSS-parsing gem, common in Ruby/Rails sanitization stacks, not universal
Threat Intel
1
1 source
Data Quality
2 sources
Confidence: Low
CVE.org GHSA 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 HIGH
CISA KEV No
Public POC No
EPSS N/A
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.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.

Attack Technique

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

Affected Products (CPE)CVE.org

pkg:rubygems/crass

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

CVE-2026-71847 HIGH POC
8.7 Aug 07

Heap-use-after-free in the Ruby json gem's native C extension (versions 2.20.0 through 2.21.1) allows an unauthenticated

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