---
id: "CVE-2026-61848"
kind: "vulnerability"
aliases: ["CVE-2026-61848", "GHSA-8vfg-2r28-hvhj"]
title: "Crass: Non-ASCII characters cause superlinear CPU consumption"
severity: "medium"
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-400", "package", "ruby", "rubygems"]
not_affected_if: ["ascii-only-input", "no-untrusted-css-parsing"]
published_at: "2026-10-29T16:35:29+00:00"
first_seen_at: "2026-10-29T16:39:02+00:00"
updated_at: "2026-10-29T16:39:47+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-8vfg-2r28-hvhj", "first_seen_at": "2026-10-29T16:39:02+00:00"}]
---

# Crass: Non-ASCII characters cause superlinear CPU consumption

Crass, a Ruby CSS parser gem, slows down sharply when parsing input full of non-ASCII characters because it inefficiently tracks multi-byte character positions. An attacker who controls the input can use up excessive CPU and cause a denial of service.

_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

- Check the installed version with `gem list crass` or the `crass` line in `Gemfile.lock`.
- Look for any code path where untrusted input is passed to Crass.

## Fix

- Upgrade `crass` to `1.0.7` or later.

## Timeline

- 2026-10-29T16:39:02+00:00 ghsa https://github.com/advisories/GHSA-8vfg-2r28-hvhj

## Documents

- [advisory] Maintainer's advisory: api.github.com https://api.github.com/repos/rgrove/crass/security-advisories/GHSA-8vfg-2r28-hvhj
- [advisory] Maintainer's advisory: github.com https://github.com/rgrove/crass/security/advisories/GHSA-8vfg-2r28-hvhj
- [fix] Release: github.com https://github.com/rgrove/crass/releases/tag/v1.0.7

## From the sources

### Impact

When parsing an input containing non-ASCII characters, inefficiencies in how Crass tracks the positions of multi-byte characters result in superlinear parsing time. An attacker-controlled input consisting of many non-ASCII characters could cause excessive CPU consumption and potentially denial of service.

### Patches

This is fixed in Crass 1.0.7.

### Workarounds

Avoid passing non-ASCII input to Crass. Or cultivate patience.

---

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