Crass: Incorrect tokenization of bad URLs enables CSS sanitizer bypass
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 1.0.8
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
Crass, a Ruby CSS parser, is affected by an issue where it mishandles certain malformed URLs, which can cause a CSS sanitizer built on it to let through styles that browsers would actually apply. This could allow attackers to alter the page's appearance, load external resources, or leak data through CSS, though it does not enable script execution in modern browsers.
Summarized by anthropic/claude-haiku-5.5. Verify details against the original sources.
Read the original description
Crass is a Ruby CSS parser that is compliant with the CSS Syntax Level 3 specification. Prior to 1.0.8, Crass incorrectly treats a closing parenthesis after an escaped backslash as escaped while consuming the remnants of a bad URL. Crass therefore keeps declarations, style rules, or at-rules inside a bad URL token even though a browser treats them as live CSS. A sanitizer that parses untrusted CSS with Crass and reserializes it without rejecting the bad URL can allow CSS used for UI redress, external resource loading, or CSS-based data exfiltration, but this issue does not enable script execution in modern browsers. This issue is fixed in version 1.0.8.
Timeline
- CVE published
- First seen by cve.now
Affected versions
- rgrove crass
fixed in 1.0.8
- crassRubyGems
fixed in 1.0.8