Polynomial-Time Regular Expression Denial of Service (ReDoS) vulnerability
Published: October 01, 2026
SECURITY IDENTIFIERS
- CVE: CVE-2026-67987 (NVD)
- GHSA: GHSA-5m38-526f-3498
GEM
SEVERITY
CVSS v3.x: 7.5 (High)
UNAFFECTED VERSIONS
< 0.1.0.pre42
PATCHED VERSIONS
>= 2.0.0.rc1
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 tags can cause excessive CPU consumption in two consecutive regular expressions and delay chat-completion processing.
RELATED
- https://nvd.nist.gov/vuln/detail/CVE-2026-67987
- https://github.com/crmne/ruby_llm/releases#release-v2.0.0.rc1
- https://rubygems.org/gems/ruby_llm/versions/2.0.0.rc1
- https://github.com/crmne/ruby_llm/commit/5e88411f171721b381853fa77d254e266dcf6ad8
- https://github.com/crmne/ruby_llm/blob/fa6f279847d6d7027814539d9c0dfc3bbdfd2a83/lib/ruby_llm/protocols/chat_completions/chat.rb#L355-L356
- https://github.com/advisories/GHSA-5m38-526f-3498
