
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-67987 is a polynomial-time Regular Expression Denial of Service (ReDoS) vulnerability in the crmne/ruby_llm Ruby AI framework, specifically in its <think> tag response parsing logic. The flaw exists at commit fa6f279847d6d7027814539d9c0dfc3bbdfd2a83 in lib/ruby_llm/protocols/chat_completions/chat.rb (lines 355–356) and affects deployments running on Ruby 3.1.x. It was published on September 29, 2026, with a patch committed the same day. The vulnerability carries a CVSS v3.1 base score of 7.5 (High) (Github Advisory).
The root cause is CWE-1333 (Inefficient Regular Expression Complexity): two consecutive regular expressions used in the extract_think_tag_content method — text.scan(%r{<think>(.*?)</think>}m) and text.gsub(%r{<think>.*?</think>}m, '') — exhibit polynomial-time worst-case behavior on Ruby 3.1.x when processing strings with many unterminated <think> tags. Because the regexes use a lazy quantifier (.*?) with the multiline flag across potentially unbounded input, a crafted or anomalous LLM response containing a large number of unclosed <think> tags causes the Ruby regex engine to perform excessive backtracking, consuming CPU proportional to the square (or higher) of the input length. No authentication or special privileges are required; the attacker only needs to influence the content of a model response processed by the library (Github Advisory, Patch Commit).
Successful exploitation causes excessive CPU consumption on the server running the ruby_llm library, degrading or completely stalling chat-completion processing. The impact is limited to availability (no confidentiality or integrity loss), but sustained exploitation could render an AI-powered application unresponsive, affecting all users of the service. Because the trigger is a model response rather than a direct user request, the attack surface includes any pathway that allows an adversary to influence LLM output — such as prompt injection or a compromised/malicious model endpoint (Github Advisory).
There is no public proof-of-concept exploit and no evidence of in-the-wild exploitation at the time of disclosure (Github Advisory). The vulnerability is automatable (no user interaction required) and exploitable over the network without credentials, but requires the ability to influence the content of an LLM response processed by the library. The EPSS score is approximately 0.17–0.43% (35th percentile), indicating low near-term exploitation probability. The CVE status is listed as "Deferred" and it is not currently listed in the CISA KEV catalog (Github Advisory).
crmne/ruby_llm at commit fa6f279847d6d7027814539d9c0dfc3bbdfd2a83 or earlier versions with the extract_think_tag_content method, running on Ruby 3.1.x.<think> tags (e.g., <think><think><think>... repeated thousands of times without closing tags).extract_think_tag_content on the malicious response string, the two vulnerable regexes (text.scan(%r{<think>(.*?)</think>}m) and text.gsub(%r{<think>.*?</think>}m, '')) enter polynomial-time backtracking, consuming CPU proportional to the input size.<think> tag patterns.<think> tag sequences.The fix is to update crmne/ruby_llm to a version that includes commit 5e88411f171721b381853fa77d254e266dcf6ad8, which removes the extract_think_tag_content method and all <think> tag parsing logic entirely — thinking content is now sourced only from provider-specific fields (reasoning, reasoning_content, etc.) (Patch Commit). If an immediate upgrade is not possible, consider implementing a pre-processing filter to reject or truncate model responses containing excessive or malformed <think> tags before they reach the parsing layer. Additionally, applying timeouts on response parsing operations and rate-limiting chat-completion requests can reduce the impact of sustained exploitation attempts (Github Advisory).
Fix availability across major Linux distributions and their releases.
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."