Skip to main content

CVE-2026-97229: Unauthenticated Code Execution in GitLab Through a Crafted CI/CD Regular Expression

· 10 min read
Ankush K
Co-founder and CTO, Dwaar
CVE-2026-97229: Unauthenticated Code Execution in GitLab Through a Crafted CI/CD Regular Expression

If you patched your self-managed GitLab three weeks ago for the regular expression bugs in CI/CD configuration, you still have work to do. The September releases do not cover the flaw GitLab disclosed on 12 October, and GitLab says this one can be reached without logging in.

ItemDetail
CVECVE-2026-97229, CWE-190 (integer overflow)
AffectedGitLab CE/EE 19.2 before 19.2.8, 19.3 before 19.3.5, 19.4 before 19.4.2
Fixed in19.2.8, 19.3.5, 19.4.2
SeverityCVSS 3.1 10.0 Critical, scored by GitLab as the CNA. NVD shows no separate score of its own
Exploited as of 2026-10-14No exploitation reported. Not in CISA KEV. Public PoC since 2026-10-13
Disclosed2026-10-12 by GitLab. NVD published 2026-10-13

What GitLab has actually said​

Not much. GitLab's advisory names an "Integer Overflow issue in CI/CD Regular Expression Compiler". The description says that under certain conditions it "could have allowed an unauthenticated user to execute arbitrary code on the GitLab server via a specially crafted regular expression in a CI/CD configuration, due to insufficient regular expression validation".

The vector is CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H: reachable over the network, low complexity, no privileges, no user interaction, scope changed. The reporter is joaxcar, through GitLab's HackerOne program, and it leads the 24 CVEs in the release.

As a general pattern, an integer overflow in a compiler works like this: the code computes the size of what it is about to build, the arithmetic wraps in a fixed-width integer, and the buffer ends up smaller than the data written into it. That describes the bug class, not this bug. GitLab's advisory does not say how this overflow becomes code execution.

Two clues narrow it down.

The first is the 23 September release. It fixed CVE-2026-89078, "a double free issue when parsing a specially crafted regular expression in a CI/CD configuration", and CVE-2026-93577, "an integer overflow issue when compiling a specially crafted regular expression in a CI/CD configuration". Both are CVSS 9.9, both need an authenticated user, and both are credited to joaxcar. The vector for CVE-2026-93577 differs from the new one in a single metric: PR:L instead of PR:N.

The second is the bug fix list in the 12 October release, which carries these two lines under each of the three versions:

  • "Add Ruby regexp program size patch for 3.3 and 3.4"
  • "Add Ruby regexp repeat-range double-free patch for 3.3 and 3.4"

Both lines link to public merge requests. omnibus-gitlab MR 9845, merged to the 19.4 stable branch on 2 October, adds the patch from Ruby PR 19020, "Avoid overflow in the regexp compiler's program size arithmetic", merged upstream on 25 September. The change is mostly in regcomp.c, with smaller edits in other files including include/ruby/onigmo.h. The patch's first commit message says an int product could overflow, so "the check that keeps the compiler from unrolling a large repeat could pass for an enormous one, hanging the compile or emitting wrapped jump offsets". MR 9848 does the same for Ruby PR 13332, a double free fix in regparse.c that upstream Ruby merged in May 2025.

GitLab itself does not tie those lines to the CVE, though public analysis places the overflow in the same regular expression compiler. The patch text describes a hang and wrapped offsets, not code execution.

GitLab has not said which component, value or trigger belongs to this CVE, what the "certain conditions" are, or why no authentication is needed. Outside researchers have filled in part of that. Public analysis from 13 October traces the flaw to an integer overflow in Ruby's Onigmo engine, triggered when an expression that got past a US-ASCII size check is recompiled against a UTF-8 repository path through the CI lint endpoint. That is a researcher's finding, not GitLab's statement. Public testing from 13 October adds a precondition to the "unauthenticated" label: the attacker must first commit a crafted .gitlab-ci.yml and a UTF-8 repository path to a branch in a public project, which an ordinary account can do on instances that allow public project creation.

Where exploitation stands​

Coverage from BleepingComputer, Security Affairs and itdaily carries no report of exploitation in the wild, and the CVE is not in CISA KEV. Public proof-of-concept code has been available since 13 October, and researchers reproduced code execution on an unpatched 19.4.1 image. No in-the-wild exploitation had been confirmed in reporting from 13 and 14 October, and that can change quickly. The GitLab page as of today offers no detections or indicators to help you tell whether it has reached you. A 10.0 on the system that holds your code does not need a KEV entry to justify an emergency change.

What to do now​

  1. Find every self-managed instance and read its version. GitLab.com is already patched, and GitLab Dedicated customers need no action.
  2. Upgrade on your minor line. 19.2 goes to 19.2.8, 19.3 goes to 19.3.5, 19.4 goes to 19.4.2. GitLab strongly recommends all self-managed installations upgrade immediately. The September versions, 19.2.7, 19.3.3 and 19.4.1, are inside the affected range.
  3. Use 19.3.5, not 19.3.4. GitLab's first version of the page said "October 8" and 19.3.4. It was corrected the same day to October 12 and 19.3.5, because "19.3.4 had a bug that affected merge request pages when the Ona integration was enabled". BleepingComputer and itdaily list 19.3.4, while Security Affairs and NVD say 19.3.5. NVD's range puts 19.3.4 inside the affected versions.
  4. Plan the outage, then take it. GitLab says "This patch will cause downtime during the upgrade as migrations must complete before GitLab can start." Multi-node installs can use the zero-downtime procedures. 19.3.5 includes a post-deploy migration.
  5. Do not hold out for a workaround. GitLab documents none. If the upgrade has to wait a few hours, the interim guidance reported on 14 October is to restrict inbound access and disable untrusted public project creation, because the attack depends on committing a crafted file to a public project branch. From that same precondition, I would also restrict anonymous access to public projects and stop untrusted users writing to them. These steps only reduce exposure along the demonstrated path and are not a fix.
  6. Keep your logs from before the upgrade. With no published indicators, you cannot clear an instance that was exposed. If it faced the internet unpatched, decide now what you would rotate if it was touched, starting with the secrets your pipelines use.

The bug sits below the code you scan​

A double free is a memory bug, and a wrapped size that ends in code execution points the same way. Ruby application code does not free memory by hand, so this sits in native code beneath the application, in a runtime GitLab packages and patches itself. You run GitLab, and GitLab runs Ruby. A pipeline configuration file is a route into native code.

Scanning the application's lockfile will not show you that chain, because there is no line in it for the runtime. A patch added during packaging is also easy to miss for anything that infers fixes from an upstream version number. That is the case for scanning the artifact you ship, and the host of your pipelines deserves the same attention, because your CI pipeline is production.

My position is that any service compiling patterns from input it does not control is running a compiler on hostile data, and it deserves the review you would give a parser for untrusted files. Nothing I have read says whether other Ruby applications are exposed to this flaw. I would still build that list of services now.

Once your GitLab is upgraded, pick your service that accepts the most user-supplied configuration. Write down the runtime it really runs in production, which patches its image carries, and whether any code path compiles a regular expression from input you do not control. If you cannot answer all three, that is your next inventory gap.

References​