Skip to main content
Vulnerability Database/CVE-2026-67989

CVE-2026-67989: ruby_llm Mistral Model ReDoS Vulnerability

CVE-2026-67989 is a regular expression denial-of-service flaw in ruby_llm affecting Mistral model capability matching on Ruby 3.1.x. This post explains the technical details, affected versions, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-67989 Overview

CVE-2026-67989 is a polynomial-time regular expression denial-of-service (ReDoS) vulnerability in the crmne/ruby_llm Ruby gem. The flaw exists in the Mistral model capability matching logic at commit fa6f279847d6d7027814539d9c0dfc3bbdfd2a83, specifically in lib/ruby_llm/providers/mistral/capabilities.rb. On Ruby 3.1.x, a crafted model identifier string triggers excessive regex backtracking and consumes CPU resources. The weakness is classified under [CWE-1333] (Inefficient Regular Expression Complexity).

Critical Impact

Remote attackers can exhaust CPU resources on applications using ruby_llm by supplying crafted Mistral model identifiers, degrading or halting service availability.

Affected Products

  • crmne/ruby_llm at commit fa6f279847d6d7027814539d9c0dfc3bbdfd2a83
  • Deployments running on Ruby 3.1.x
  • Applications invoking the Mistral provider capabilities module

Discovery Timeline

  • 2026-10-02 - CVE-2026-67989 published to NVD
  • 2026-10-02 - Last updated in NVD database

Technical Details for CVE-2026-67989

Vulnerability Analysis

The vulnerability resides in the Mistral provider's capabilities.rb file at line 92. Regex patterns used to classify Mistral model identifiers contain overlapping quantifiers that trigger polynomial-time backtracking on Ruby 3.1.x. When the regex engine evaluates a long, specially crafted input, matching time grows non-linearly with input length. The result is a denial-of-service condition that blocks the Ruby thread processing the request. Because ruby_llm is commonly used in web backends and automation pipelines, a single malicious request can degrade service for other users.

Root Cause

The root cause is an inefficient regular expression used to match Mistral model variants, including voxtral family identifiers. The pattern permits catastrophic backtracking paths when evaluated against adversarial strings. Ruby 3.2 and later include regex timeout mitigations that reduce exposure; Ruby 3.1.x lacks that protection and is directly impacted.

Attack Vector

The attack vector is network-based and requires no authentication or user interaction. An attacker submits a crafted model identifier string to any endpoint that forwards user-controlled values into the Mistral capability lookup. The regex engine then stalls on backtracking, consuming CPU until the input is exhausted or the process is terminated.

ruby
     class Mistral
       # Determines capabilities for Mistral models
       module Capabilities
+        VOXTRAL = 'voxtral'
+
         module_function
 
         def supports_streaming?(model_id)

Source: GitHub Commit dd3c848

This patch introduces a VOXTRAL constant and refactors matching to avoid the vulnerable backtracking pattern when evaluating voxtral variants.

Detection Methods for CVE-2026-67989

Indicators of Compromise

  • Sustained high CPU utilization on Ruby worker processes handling LLM provider lookups.
  • Request latency spikes correlated with calls into RubyLLM::Providers::Mistral::Capabilities.
  • Unusually long model identifier strings in application logs or API request bodies.

Detection Strategies

  • Audit application dependencies for the vulnerable ruby_llm commit and Ruby 3.1.x runtimes.
  • Instrument the Mistral capabilities module to log inputs exceeding expected length bounds.
  • Deploy application performance monitoring to flag single-request CPU consumption outliers.

Monitoring Recommendations

  • Alert on Ruby thread CPU time exceeding a defined threshold per HTTP request.
  • Monitor web application firewall logs for oversized model identifier parameters.
  • Track process-level CPU saturation across pods or workers hosting ruby_llm.

How to Mitigate CVE-2026-67989

Immediate Actions Required

  • Upgrade ruby_llm to a release containing commit dd3c84812598def03d4aff77b5447c41d8f5c34e or later.
  • Upgrade the Ruby runtime to 3.2 or newer to benefit from built-in regex timeout protections.
  • Validate and length-limit any user-supplied model identifier before it reaches the capability matcher.

Patch Information

The maintainer addressed the issue in commit dd3c848, which rewrites Mistral voxtral variant matching to eliminate backtracking. Review the ruby_llm repository for the current released version and release notes.

Workarounds

  • Reject model identifier inputs longer than a strict allowlist bound at the application boundary.
  • Wrap calls to the Mistral capabilities module with a per-call timeout using Timeout.timeout.
  • Restrict Mistral provider usage to a validated allowlist of known model names.
bash
# Update to a patched ruby_llm release and modern Ruby
bundle update ruby_llm
ruby -v  # ensure Ruby >= 3.2 for Regexp.timeout support

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.