RubyGems
CVE-2026-116695
Crass: Incorrect tokenization of bad URLs enables CSS sanitizer bypass
- Severity
- Medium
- Published
- 28 Oct 2026
- Last changed
- 28 Oct 2026
- Added to UpHeron
- 23 Nov 2026
- Fixed in
- 1.0.8
- Exploit chance
- 0.4% in the next 30 daysHigher than 29% of CVEs. EPSS by FIRST, 24 Nov 2026
- Weakness
- CWE-436
- Also known as
- GHSA-pq4g-8rxf-4g29
- Sources
- OSV.dev and GitHub
Description
Crass's tokenizer didn't terminate a bad URL token at a ) that followed an escaped backslash (\). As a result, Crass consumed more input as part of the bad URL than a spec-compliant browser does. CSS sanitizers that parse untrusted CSS with Crass and re-emit it could be tricked into passing through declarations, style rules, or at-rules (including @import) that the sanitizer would otherwise have removed, but that a browser would then parse and apply.
While consuming the remnants of a bad URL (CSS Syntax Level 3, §4.3.15), Crass checked whether the previously consumed code point and the next code point formed a valid escape, in addition to checking the next two unconsumed code points. After an escaped backslash, the previously consumed code point is a backslash, so a following ) was incorrectly treated as escaped and the bad URL token continued until the next unescaped ) or the end of the input.
Workarounds
There are no practical workarounds other than upgrading. Rejecting any CSS input that contains the character sequence \ would block the known trigger, but this is a blunt measure and may reject legitimate CSS.
Affected software
| Software | Affected versions |
|---|---|
crassRubyGems · osv:RubyGems:crass |
|
About crass
- Total downloads (RubyGems)
- 649,854,345RubyGems, 23 Nov 2026
Vulnerabilities in crass
- In our list
- 4
- Published in the last 12 months
- 4
- Critical, last 12 months
- 0
- High, last 12 months
- 0
- Known exploited
- 0
- CVE-2026-61848Crass: Non-ASCII characters cause superlinear CPU consumptionMedium 29 Oct 2026
- CVE-2026-61847Crass: A large number of adjacent CSS comments can trigger a SystemStackErrorMedium 29 Oct 2026
- CVE-2026-61846Crass: Deeply nested CSS blocks and functions can trigger a SystemStackError or excessive memory usageMedium 29 Oct 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-116695
- GitHub Advisory Database https://github.com/advisories/GHSA-pq4g-8rxf-4g29