CVE-2026-79770 is a ReDoS in Nokogiri's CSS selector tokenizer, and it breaks a common security assumption you probably hold. The attack surface isn't the document parsing layer — it's the search API. Methods like Node#css and Searchable#search accept selector strings that get lexed by an internal regex engine before any document processing occurs. A crafted selector like [a='...repeated...'] triggers exponential backtracking in the tokenizer's identifier or string-literal regex. The exploit lives in the selector parameter, not the document.
This matters because your threat model is likely wrong. Nokogiri security guidance obsesses over document sanitization — don't let users inject malicious HTML. But the selector string has no such documentation, no warnings, no mental model around untrusted input. The API naming actively misleads: Node#css sounds like a document query method, not a string interpreter. The cognitive gap is baked into the library's design.
Realistic attack pathways: web frameworks with dynamic selectors are the obvious vector, but look deeper. Template engines, CMS search plugins, markdown processors, static site generators, and build pipelines often invoke Nokogiri's search methods through intermediate libraries you didn't write and haven't reviewed. The attacker may not call Node#css directly — they find a library that calls it for them. Trace your data flow: HTTP parameter → view helper → template processor → Nokogiri. How many of those layers have you audited for selector injection?
On the fix: version 1.19.3 addresses this, but the remediation quality matters more than the version number. If the maintainers patched the vulnerable regex with a safer regex, they've closed this instance but left the architectural vulnerability intact — regex-based tokenizers written during 2010-2015 are systematically aging into ReDoS discoverability. Expect recurring CVEs on this component within 24 months if the tokenizer wasn't replaced with a proper parser combinator or state machine. Check the changelog: did they add ReDoS regression tests to CI? Without that, future changes to selector handling can silently reintroduce backtracking.
Operational blast radius extends beyond the DoS. Malicious selectors saturate logging infrastructure, poison query caches, and trigger alerts that create operational noise across your observability stack. And because Nokogiri is a transitive dependency in virtually every Rails application, the blast radius of a "fixed" library that now has community-wide permission to expose selector APIs more freely is substantial.
What to do now: audit every code path where user input reaches Node#css, Searchable#search, or any method that accepts CSS selectors. Treat selector strings as untrusted input requiring the same validation you'd apply to SQL queries. Monitor your dependency scanners for follow-up CVEs on Nokogiri's selector handling — this almost certainly won't be the last.