CVE-2026-67987

Denial‑of‑Service via Polynomial‑Time Regex in ruby_llm <think> Tag Parsing

Published Sep 29, 2026 CVSS 3.1 · 7.5 High EPSS < 1% KEV · Not listed
Description
crmne/ruby_llm at commit fa6f279847d6d7027814539d9c0dfc3bbdfd2a83 contains polynomial-time regular expression denial-of-service conditions in think-tag response parsing on Ruby 3.1.x. A malicious or anomalous model response containing many unterminated <think> tags can cause excessive CPU consumption in two consecutive regular expressions and delay chat-completion processing

Analysis

AI-generated

Technical impact

The vulnerability resides in the ruby_llm library used with Ruby 3.1.x and involves polynomial‑time regular expressions that parse <think> tags. This instance of CWE-1333 involves excessive resource consumption. Crafting a model response containing many unterminated <think> tags triggers two consecutive regular expressions that consume excessive CPU time, delaying or blocking chat‑completion responses. It can lead to a denial‑of‑service by exhausting the processor resources of the application.

Affected Systems

Any deployment of the ruby_llm library that targets Ruby 3.1.x, such as an application running the reference commit fa6f279847d6d7027814539d9c0dfc3bbdfd2a83, is affected. The vendor is unlisted; the library is open‑source on GitHub under the crmne organization.

Risk and Exploitability

The EPSS score is < 1%, indicating a low probability of exploitation, and the CVSS score of 7.5 shows a high severity vulnerability. The likely attack vector involves a malicious or anomalous model response that the application processes, which could be triggered by an attacker that controls the upstream model output or that injects crafted responses. Successful exploitation would cause CPU exhaustion and prevent timely chat completions, impacting the availability of the service.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the latest release of ruby_llm that addresses the regex issue or revert to a stable commit prior to the vulnerability if an update is not yet available.
  • Sanitize or validate incoming model responses so that <think> tags are properly closed before regex parsing; consider stripping unterminated tags or limiting the number of <think> tags processed.
  • Configure application or operating system resource limits, such as CPU time quotas or thread timeouts, to prevent a single chat completion from consuming excessive processing time.
  • If immediate update is not possible, temporarily disable think‑tag parsing or replace the regexes with safer parsing logic until a patch is available.

Generated by OpenCVE AI on October 1, 2026 at 21:02 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Crmne
Crmne ruby Llm
Vendors & Products Crmne
Crmne ruby Llm
Type Values Removed Values Added
Title Denial‑of‑Service via Polynomial‑Time Regex in ruby_llm <think> Tag Parsing
Type Values Removed Values Added
Title Ruby LLM Regular Expression Denial‑of‑Service in Think‑Tag Parsing
Weaknesses CWE-20
CWE-770
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Weaknesses CWE-1333
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}

Type Values Removed Values Added
Title Ruby LLM Regular Expression Denial‑of‑Service in Think‑Tag Parsing
Weaknesses CWE-20
CWE-770
Type Values Removed Values Added
Description crmne/ruby_llm at commit fa6f279847d6d7027814539d9c0dfc3bbdfd2a83 contains polynomial-time regular expression denial-of-service conditions in think-tag response parsing on Ruby 3.1.x. A malicious or anomalous model response containing many unterminated <think> tags can cause excessive CPU consumption in two consecutive regular expressions and delay chat-completion processing
References
Weaknesses
  • CWE-1333

    Inefficient Regular Expression Complexity

Sources

Status
PUBLISHED
Assigner
mitre
Published
Updated
Oct 1, 2026, 3:22 PM
Reserved
Jul 30, 2026, 12:00 AM
Status
Deferred
Published
Sep 29, 2026, 8:17 PM
Modified
Oct 1, 2026, 4:17 PM