Ruby Fixes the Onigmo Regexp Bugs Behind GitLab's Four CVEs: Upgrade to 4.0.9, 3.4.12 or 3.3.13 If Your Apps Compile Untrusted Patterns

Ruby Onigmo regex engine: fixes out in Ruby 4.0.9, 3.4.12 and 3.3.13 for apps that compile untrusted regular expressions; GitLab's CVE-2026-97229 is in CISA KEV.

Updated 31 October 2026 (Cyprus time, UTC+2): On 29 October 2026 CISA added GitLab's CVE-2026-97229, one of the four GitLab CVEs caused by these Ruby bugs, to its Known Exploited Vulnerabilities (KEV) catalog, "based on evidence of active exploitation". US federal civilian agencies must fix it by 1 November 2026. The other three CVEs are not in KEV. CISA's entry notes that other products "can potentially be affected by the same underlying Ruby/Onigmo" issue. Alpine Linux has also reported an attempt to exploit CVE-2026-97229 on its own GitLab server, and says GitLab installs that run on their own Ruby need a fixed Ruby as well as a GitLab upgrade. We have corrected the earlier statements that none of the CVEs was in KEV and that no exploitation had been reported, and added a section on these developments, a GitLab-on-your-own-Ruby step and updated sources.

On 23 October 2026 the Ruby core team released Ruby 4.0.9, 3.4.12 and 3.3.13. The releases fix three bugs in Onigmo, the regular-expression engine built into Ruby. GitLab had found that these bugs could be turned into remote code execution on GitLab servers, and it fixed them in its own releases between 23 September and 21 October under four GitLab CVE IDs. Ruby's point is that the bugs live in Ruby itself, so they matter for any Ruby application that builds a regular expression from text an attacker controls, not only GitLab.

Most Ruby applications are not in that position. Ruby says the bugs are reached only when an app compiles a regular expression from an attacker-controlled string. Apps that only use regular expressions written by their own developers are not affected. One of the GitLab CVEs is now listed as exploited. On 29 October 2026 CISA added CVE-2026-97229, the GitLab CI/CD flaw caused by Ruby bug #19020, to its Known Exploited Vulnerabilities (KEV) catalog, citing "evidence of active exploitation" (CISA alert). CISA has not said what that evidence is. The only exploitation attempt we have found publicly described was against a GitLab server: Alpine Linux says an attacker tried to exploit CVE-2026-97229 on its GitLab instance. Alpine found no evidence that the attack succeeded, but could not rule it out, and rebuilt the server anyway (details below). As of 31 October 2026, 08:14 Cyprus time (UTC+2), the other three CVEs (CVE-2026-89078, CVE-2026-93577 and CVE-2026-110264) are not in KEV, and CISA's assessment on their CVE records still says "Exploitation: none". We have found no report of exploitation against a Ruby application other than GitLab. Ruby has not requested CVE IDs of its own.

We covered the GitLab side, including GitLab's fixed versions and detection rules, in our GitLab CVE-2026-110264 post. This post is about everyone else who runs Ruby.

Technical Information

What Ruby has said (Ruby announcement, 23 October 2026):

  • GitLab compiles regular expressions supplied by its users, such as patterns in CI configuration, with Regexp.new. GitLab found that specially crafted patterns could corrupt memory while Ruby compiles them, and that this could be turned into remote code execution on GitLab servers.
  • The fixes are three changes in Ruby: a double free when parsing a pattern fails after an alternation (Ruby change #13332), an integer overflow in the size of a compiled pattern (#19020), and an overflow of internal IDs in a pattern with many repeats (#16801).
  • "These bugs 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, or by interpolating it into a regexp literal such as /#{input}/."
  • "Applications that only use regular expressions written by their own developers are not affected."
  • Regexp.timeout does not protect against these bugs. Limiting the length of patterns does not reliably protect either, because Ruby says some of the bugs can be triggered by short patterns.
  • Ruby has "not requested CVE identifiers in Ruby for these fixes, at least for now", and asks users to track the issues by GitLab's CVE IDs, for example in a security scanner. Ruby says it will discuss whether to treat this kind of issue as a Ruby vulnerability and will update its page if it requests any CVE IDs.

How the GitLab CVEs map to the Ruby fixes (Ruby's table; scores are GitLab's, as the CVE Numbering Authority, and describe GitLab, not Ruby):

GitLab CVEBug in Ruby (Ruby change)GitLab release and dateGitLab's CVSS 3.1
CVE-2026-89078Double free when parsing a pattern fails after an alternation (#13332)19.4.1, 23 September 20269.9 (authenticated user)
CVE-2026-93577Integer overflow in the size of a compiled pattern (#19020)19.4.1, 23 September 20269.9 (authenticated user)
CVE-2026-97229Same Ruby bug as above (#19020)19.4.2, 12 October 202610.0 (unauthenticated). In CISA KEV since 29 October 2026.
CVE-2026-110264Overflow of internal IDs in a pattern with many repeats (#16801)19.5.1, 21 October 202610.0 (unauthenticated)

How serious is this for Ruby apps that are not GitLab? Ruby has not scored these fixes, and there is no CVSS score for Ruby itself. GitLab rates its four CVEs Critical for GitLab, where user-supplied patterns reach the regex compiler directly. For other software, the risk depends entirely on whether attacker-controlled text ever becomes a regular expression. For most supplier portfolios we treat this as a medium-priority, check-and-patch item: important where a product lets users or customers supply patterns, irrelevant where it does not (Rescana assessment, not a CVSS score). Two exceptions are now urgent: any self-managed GitLab server, because CISA lists CVE-2026-97229 as exploited, and any product known to compile patterns that users supply, since CISA itself warns that other products may be affected by the same Ruby bug (Rescana assessment).

The compile call can sit inside a dependency. GitLab's published detection notes say one of its affected paths ran through a third-party gem that builds a regular expression from file content (GitLab Security, "Onigmo native worker crash" detection). So a team that never writes Regexp.new itself can still be in scope through a library it uses.

Why scanners may miss it. The four CVE records on cve.org list only GitLab as the affected product, and NVD's product matches (CPEs) for all four records name only GitLab. NVD has not added scores of its own; it shows GitLab's. A scanner that matches CVE records against installed packages will therefore not flag an unpatched Ruby runtime under these IDs. Ruby's security page, which lists its CVE advisories, does not include the 23 October announcement either.

What changed on 29 October: CISA KEV and the Alpine Linux incident

CISA KEV entry for CVE-2026-97229 (live catalog version 2026.10.30, checked 31 October 2026, 08:13 Cyprus time, UTC+2): vendor GitLab, product "Community Edition and Enterprise Edition"; added 29 October 2026; due date 1 November 2026 (this deadline binds US federal civilian agencies under CISA's BOD 26-04); known use in ransomware campaigns "Unknown". CISA has also marked the entry "Yes" for forensic triage, which under BOD 26-04 means agencies are expected to check whether attackers compromised a system before it was patched. CISA's notes on the entry say: "Other products can potentially be affected by the same underlying Ruby/Onigmo Integer Overflow issue in CI/CD Regular Expression Compiler", and they link to Ruby's announcement. The CVE record on cve.org now carries a CISA assessment of "Exploitation: active" for CVE-2026-97229. NVD still shows only GitLab's score of 10.0.

What Alpine Linux reported (Alpine, 28 October 2026, updated 30 October):

  • On 20 and 21 October, a newly registered account sent crafted CI configurations to Alpine's GitLab server, which was still on 19.3.4 without GitLab's 12 October fix. GitLab worker processes crashed 8 times. Alpine says that "in 4 of those crashes the attacker got partway through the exploit and failed at the next step", and that the attacker's attempts to get back in on 25 and 26 October failed.
  • Alpine: "The attack came close to working. We have found no evidence that it succeeded, but we cannot rule it out, so we treated the instance as compromised and rebuilt it from scratch." It says its aports repository, packages and 21 October releases were not tampered with, and that its signing keys were never on the GitLab server. It reset all passwords and replaced GitLab's secret keys.
  • Upgrading GitLab alone did not fix it. Alpine's image ran GitLab on standard Ruby, so its upgrade to GitLab 19.3.6 on 22 October left the flaw in place. In Alpine's words, the fix is "a patch to Ruby, which GitLab applies only in its official packages". Alpine: "If you run GitLab with your own Ruby (from source or in your own container image) rather than GitLab's packages, upgrading GitLab is not enough: you also need Ruby 3.3.13, 3.4.12, 4.0.9 or later."
  • Alpine says its own ruby package is fixed: Alpine 3.22, 3.23, 3.24 and edge ship Ruby 3.4.12, and Alpine 3.21 ships 3.3.13. It also says the bug exposes "any program that compiles regular expressions from untrusted input", not only GitLab.

CISA has not said whether the Alpine attempt is the evidence behind the KEV listing, so we do not link the two.

What is not known yet:

  • Whether Ruby will request its own CVE IDs, and whether it will treat compiling untrusted patterns as a supported use case. Ruby's Regexp documentation currently discusses untrusted patterns only as a denial-of-service concern and recommends a timeout.
  • When operating-system distributions, container images and other software that bundles its own Ruby will ship these fixes. Alpine says its Ruby packages are fixed; we have not checked other distributions, and without a Ruby CVE ID some may not track the issue.
  • What evidence of exploitation CISA relied on, and whether any attack on CVE-2026-97229 has succeeded. Neither CISA nor GitLab has said.
  • Which other products compile user-supplied patterns. No vendor other than GitLab has published an advisory saying a product of its own compiles user-supplied patterns and is affected.

Timeline (dates as published; times in Cyprus time where the source gives one: UTC+3 until 25 October, UTC+2 from 25 October):

  • 27 March 2026: Ruby 3.2.11, the final release of the 3.2 series. Ruby 3.2 reached end of life on 1 April 2026.
  • 23 September 2026: GitLab 19.4.1, 19.3.3 and 19.2.7 fix CVE-2026-89078 and CVE-2026-93577.
  • 12 October 2026: GitLab 19.4.2, 19.3.5 and 19.2.8 fix CVE-2026-97229. CERT-EU publishes advisory 2026-016 for GitLab.
  • 20 to 21 October 2026: An attacker tries to exploit CVE-2026-97229 on Alpine Linux's GitLab server, which is missing the 12 October fix (per Alpine).
  • 21 October 2026: GitLab 19.5.1 and backports (down to 18.11.13) fix CVE-2026-110264. CERT-EU publishes advisory 2026-019 for GitLab on 22 October.
  • 22 October 2026: Ruby 4.0.8, a routine bugfix release. Per Ruby's table it contains two of the three fixes but not #16801.
  • 23 October 2026, 06:11 (03:11 UTC): Ruby publishes its announcement and releases 4.0.9, 3.4.12 and 3.3.13.
  • 25 October 2026, 08:16 (UTC+2): None of the four CVEs was in CISA KEV (catalog version 2026.10.23). All four cve.org records carried a CISA-ADP assessment of "Exploitation: none". We found no Ruby advisory from CISA, CERT-EU, CCCS, BSI or JPCERT.
  • 28 October 2026: Alpine Linux discloses the attempted exploitation and says it rebuilt its GitLab server.
  • 29 October 2026: CISA adds CVE-2026-97229 to KEV, due 1 November 2026.
  • 31 October 2026, 08:14 (UTC+2): CVE-2026-97229 is in KEV (catalog version 2026.10.30). CVE-2026-89078, CVE-2026-93577 and CVE-2026-110264 are not, and their cve.org records still say "Exploitation: none".

Affected Product Versions

Applies only to applications that compile regular expressions from attacker-controlled text (see above). Versions and status from Ruby's announcement and maintenance branches page.

Ruby branchBranch statusFixed release (contains all three fixes)Notes
4.0Normal maintenance4.0.9 (23 Oct 2026)4.0.8 (22 Oct) is not enough: it lacks the fix behind GitLab's CVE-2026-110264. 4.0.0 to 4.0.7 lack two of the three fixes.
3.4Normal maintenance3.4.12 (23 Oct 2026)First 3.4 release with any of the three fixes.
3.3Security maintenance (end of life expected 31 March 2027)3.3.13 (23 Oct 2026)Ruby included the fixes as an exception, because GitLab assigned CVEs. First 3.3 release with any of the fixes.
3.2 and olderEnd of life (3.2 since 1 April 2026)NoneRuby said 3.2.11 was the final 3.2 release, with no further updates "including security fixes", and recommends moving to 3.4 or 4.0 (Ruby 3.2.11 post).
GitLab self-managed—GitLab's fixed versionsGitLab's official packages and container images ship its own patched Ruby. GitLab installs on their own Ruby (from source or in a custom container image) also need Ruby 4.0.9, 3.4.12 or 3.3.13 or later, per Alpine. GitLab.com and GitLab Dedicated are patched, GitLab says. CVE-2026-97229 is in CISA KEV. See our GitLab post.

Ruby's announcement does not mention the 4.1 preview release.

Workaround and Mitigation

1. Find out whether you compile untrusted patterns. Look for features where users, customers or partners supply something that becomes a regular expression: search or filter boxes that accept regex, alerting or rule builders, routing, allow-list or deny-list settings, CI or workflow configuration, and content rendering. Check dependencies as well as your own code, because the compile call can sit inside a gem (Rescana guidance).

2. Upgrade Ruby. Ruby recommends 4.0.9, 3.4.12 or 3.3.13 or later. On 4.0, make sure you are on 4.0.9, not 4.0.8. On 3.2 or older there is no fix; move to 3.4 or 4.0. Remember Ruby copies you do not manage directly: container base images, language version managers, and products that bundle their own Ruby (Rescana guidance).

3. If you run GitLab on your own Ruby, upgrade both. A GitLab built from source, or a container image that installs Ruby separately, does not get GitLab's Ruby patch from a GitLab upgrade. Alpine says such servers also need Ruby 3.3.13, 3.4.12, 4.0.9 or later. Because CISA lists CVE-2026-97229 as exploited, do this first, and treat any such server that was reachable while unpatched as possibly compromised, as Alpine did (the priority and compromise advice are Rescana guidance).

4. If you cannot upgrade yet, Ruby's advice is to avoid compiling regular expressions from untrusted input. Where a feature depends on it, consider switching that feature off until the runtime is patched (Rescana guidance).

5. Do not rely on the usual regex defences. Ruby says Regexp.timeout does not protect against these bugs and that limiting pattern length is not reliable.

6. Track by GitLab's CVE IDs, but do not trust a clean scan. Ruby asks users to track the issues under the four GitLab CVE IDs. Because those records name only GitLab, check Ruby versions directly rather than waiting for a scanner finding (Rescana guidance).

Indicators of Compromise

Ruby has published no indicators of compromise, and we know of none for Ruby applications other than GitLab. GitLab has published behaviour-based detection rules for self-managed GitLab, linked in our GitLab post. Those rules look for Ruby interpreter crash reports that involve the Onigmo engine. In other Ruby applications, an unexplained interpreter crash in regex code is worth a look (Rescana guidance). But GitLab warns that a successful exploit "does not reliably crash", so a quiet log does not prove a system is clean. Alpine has described the attack on its GitLab server only in terms of behaviour (a newly registered account, crafted CI configurations, worker crashes and 502 errors) and has not published indicators. There are no hashes, IP addresses or domains to share.

What we will update

We will update this post if Ruby requests CVE IDs or changes its announcement or documentation, if exploitation is reported against any Ruby application other than GitLab, if CISA adds any of the other three CVEs to KEV, if CISA or GitLab says more about the exploitation of CVE-2026-97229, if the CVE or NVD records add Ruby as an affected product, or if a national CERT issues a Ruby advisory.

Sources

Follow-up-of: gitlab-cve-2026-110264-unauthenticated-rce-october-2026

Ruby runs inside many SaaS platforms, developer tools and internal portals your suppliers operate, and a fix with no Ruby CVE ID is easy for their scanners to miss. Working with your key vendors to confirm they either never compile customer-supplied patterns or are on the fixed Ruby releases closes that gap quickly and without drama.

Forward this to your TPRM owner: Ask your key software and SaaS suppliers whether any product they run for you lets users supply regular expressions, and if so, whether those systems are on Ruby 4.0.9, 3.4.12 or 3.3.13 or later (not 4.0.8, and not 3.2 or older). Ask suppliers that run self-managed GitLab whether every server has GitLab's fix for CVE-2026-97229, which CISA now lists as exploited, and, if they run GitLab on their own Ruby, whether that Ruby is a fixed version too (Rescana guidance).

Want a fast, evidence-based view of which suppliers in your vendor ecosystem run the software behind advisories like this one, and how quickly they patch?

Talk to an expert

Talk to an expert

Talk to Rescana about this advisory — or about how we help TPRM teams keep reviews moving.