Polynomial-Time Regular Expression Denial of Service (ReDoS) vulnerability
Published: August 13, 2026
SECURITY IDENTIFIERS
- CVE: CVE-2026-67991 (NVD)
- GHSA: GHSA-42r3-x6vx-x49x
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 a polynomial-time regular expression denial-of-service condition in RubyLLM::Utils.underscore on Ruby 3.1.x. A very long crafted class, agent, or tool name can cause excessive CPU consumption and a denial of service.
Update: "the helper was extracted from existing code, so released gems were affected too. All three reports concern polynomial-time behavior on Ruby 3.1.x; exposure depends on untrusted data reaching the affected operation."
RELATED
- https://nvd.nist.gov/vuln/detail/CVE-2026-67991
- https://github.com/crmne/ruby_llm/releases/tag/v2.0.0.rc1
- https://rubygems.org/gems/ruby_llm/versions/2.0.0.rc1
- https://github.com/crmne/ruby_llm/commit/9d75b033d7d00c4e1baa9b0afb4828faa8bd6602
- https://gist.github.com/Zykis1024/9f2d68fa3fd4e3a0ab83063bbe61a8e2
- https://github.com/crmne/ruby_llm/blob/fa6f279847d6d7027814539d9c0dfc3bbdfd2a83/lib/ruby_llm/utils.rb#L13
- https://github.com/advisories/GHSA-42r3-x6vx-x49x
