---
id: "CVE-2026-61845"
kind: "vulnerability"
aliases: ["CVE-2026-61845", "GHSA-6wmf-3r64-vcwv"]
title: "Crass : Large numeric exponents cause CPU and memory denial of service"
severity: "high"
cvss: null
epss: null
exploited: false
status: "open"
category: "package"
products: [{"name": "crass", "fixed": ["1.0.7"], "affected": "< 1.0.7", "ecosystem": "rubygems"}]
ecosystems: ["rubygems"]
tags: ["crass", "css-parsing", "cwe-674", "package", "ruby", "rubygems"]
not_affected_if: ["crass-below-1.0.7-absent", "no-untrusted-css-input"]
published_at: "2026-10-20T14:32:39+00:00"
first_seen_at: "2026-10-23T19:11:32+00:00"
updated_at: "2026-10-23T20:13:40+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-6wmf-3r64-vcwv", "first_seen_at": "2026-10-23T19:11:32+00:00"}]
---

# Crass : Large numeric exponents cause CPU and memory denial of service

Crass is a Ruby CSS parser; versions before 1.0.7 convert scientific-notation numbers with unbounded exponents before clamping, so a tiny crafted CSS string makes parsing consume excessive CPU and memory. An attacker who can supply CSS to an application that parses it with Crass can cause a denial of service, possibly a crash.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- rubygems:crass affected < 1.0.7 fixed 1.0.7

## How to check

Run `bundle exec gem list crass` or check Gemfile.lock for crass versions below 1.0.7.

## Fix

Upgrade the crass gem to 1.0.7 or later.

## Timeline

- 2026-10-23T19:11:32+00:00 ghsa https://github.com/advisories/GHSA-6wmf-3r64-vcwv

## From the sources

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

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
