CVE Database›Document archive›CVE-2026-110264

CVE-2026-110264

ruby: integer overflow issue in regular expression compiler

Loading…

Severity

Moderate

Red Hat Product Security

9.8

CVSS 3.1

Review impact separately from score.

Published · October 22, 2026

Updated · October 30, 2026

Description

A flaw was found in Ruby. When compiling a specially crafted regular expression containing an excessive number of repeats with the methods Regexp.new, Regexp.union, Regexp.compile, or via a string interpolation such as /#{input}/, an integer overflow of internal IDs can occur. This integer overflow causes memory corruption, potentially resulting in arbitrary code execution.

Statement

Red Hat has rated the impact of these flaws as Moderate for the Ruby packages shipped in Red Hat Enterprise Linux. The Ruby packages provide a language interpreter and standard library and do not accept external input on their own; these flaws are reachable only when an application compiles a regular expression constructed from attacker-controlled input.

Upstream Ruby has published a security advisory for these issues and scopes the flaws narrowly, stating that they "are reached only when an application compiles a regular expression from a string that an attacker controls, for example by passing it to Regexp.new, Regexp.union or Regexp.compile", and that "applications that only use regular expressions written by their own developers are not affected". Upstream further notes that Ruby "has generally considered it unsafe to compile and use a regular expression created from untrusted input".

The CVE identifiers for these flaws were assigned by GitLab, where the issues were originally reported and where remote code execution was demonstrated against GitLab's own application. Ruby did not request separate identifiers and has asked downstream distributors to track these issues under GitLab's CVE IDs.

CVSS score applicability

The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.

Mitigation

To mitigate this vulnerability, do not compile regular expressions from untrusted sources. Standard safeguards such as Regexp.timeout or limiting the length of the input pattern do not protect against this issue.

CVSS / CWE

CVSS 3.1 · 9.8
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

CWE-190 · Integer Overflow or Wraparound