Patched GitLab and Still Exposed? CVE-2026-97229 Hides in Ruby, Not Just GitLab

2026-12-03来源 dev.toEnglish
Patched GitLab and Still Exposed? CVE-2026-97229 Hides in Ruby, Not Just GitLab

Most of us treat "I upgraded GitLab" as the end of a security incident. Alpine Linux upgraded its GitLab after a critical bug and was still vulnerable four days later, because the fix wasn't really in GitLab at all.

That bug is CVE-2026-97229, a CVSS 10.0 flaw in how GitLab handles regular expressions in CI/CD configuration. On October 29, CISA added it to its Known Exploited Vulnerabilities catalog, citing evidence of active exploitation. If you run self-managed GitLab, this is the week to check both your GitLab version and the Ruby underneath it.

Top image: İsmail Arılık via Wikimedia Commons, CC BY-SA 4.0

What the bug does

GitLab's advisory, published with its October 12 critical patch release, describes an issue that "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." Affected versions are 19.2 before 19.2.8, 19.3 before 19.3.5 and 19.4 before 19.4.2. GitLab credits the researcher joaxcar, who reported it through its HackerOne program.

GitLab.com was already patched, and GitLab says all Dedicated tenants were patched with an internal release before the public one. So this is a self-managed problem.

Unauthenticated plus code execution plus a CI feature that many instances expose to anyone who can register an account is about as bad as a GitLab bug gets. That's why the score is a flat 10.0.

The twist: the bug lives in Ruby's regex engine

The Ruby core team explained the mechanics in an October 23 post. GitLab compiles regular expressions supplied by its users, such as patterns in CI configuration, with Regexp.new. Specially crafted patterns could corrupt memory while Ruby compiled them, and GitLab found that this could be turned into remote code execution. The underlying bugs are in Onigmo, Ruby's built-in regular expression engine.

GitLab fixed the issue in its own releases by patching the Ruby it ships. Upstream Ruby followed with Ruby 4.0.9, 3.4.12 and 3.3.13, which contain fixes for all four GitLab CVEs tied to these bugs: CVE-2026-89078, CVE-2026-93577, CVE-2026-97229 and CVE-2026-110264.

That split is the whole story. If you run GitLab from the official Omnibus packages or GitLab's own images, you get GitLab's patched Ruby. If you build GitLab from source or in your own container image on top of a distribution's Ruby, upgrading GitLab alone doesn't bring the fix with it.

Red faceted gem logo of the Ruby programming language, whose regex engine Onigmo contains the bugs behind the GitLab CVEs

Expand

Red faceted gem logo of the Ruby programming language, whose regex engine Onigmo contains the bugs behind the GitLab CVEs

Image: Yukihiro Matsumoto, Ruby Visual Identity Team via Wikimedia Commons, Public domain

What happened to Alpine Linux

Alpine's incident report is the most useful thing published about this bug, because it shows exactly how a careful team still got caught.

On October 13, the day the CVE was published, Alpine upgraded to GitLab 19.3.4 instead of 19.3.5 by mistake, so the server never had the fix. On October 20 and 21, a newly registered account sent crafted CI configurations to the instance. That crashed GitLab worker processes eight times, and in four of those crashes, Alpine says, "the attacker got partway through the exploit and failed at the next step." The attacker also downloaded Alpine's GitLab container image, which Alpine reads as a sign they were tuning the exploit to its exact build.

Then came the part every admin should read twice. Alpine upgraded to GitLab 19.3.6 on October 22, and that didn't fix the vulnerability. Its image used standard Ruby, so it never received GitLab's Ruby patch. Alpine found the instance still vulnerable on October 26, closed GitLab to everyone except developers and build servers on October 27 and rebuilt it from scratch.

Alpine says it found no evidence that the attacker ran code, and that its packages, signing keys and October 21 releases weren't tampered with. But it couldn't rule out code execution, so it treated the instance as compromised, reset all passwords and replaced GitLab's secret keys. It reopened on October 29 on GitLab 19.3.7.

I think that was the right call, and an expensive one. A rebuild is days of work. Patching both layers on day one would have cost an afternoon.

Don't stop at the October 12 versions

There's a second trap. GitLab shipped another critical patch release on October 21 for CVE-2026-110264, a separate integer overflow in the regular expression compiler, also scored CVSS 10.0 and also exploitable by an unauthenticated user. The affected range is much wider: all versions from 7.0 before 18.11.13, plus 19.0 before 19.0.10, 19.1 before 19.1.9, 19.2 before 19.2.9, 19.3 before 19.3.6, 19.4 before 19.4.3 and 19.5 before 19.5.1.

In other words, an instance sitting on 19.4.2 is safe from CVE-2026-97229 but still open to CVE-2026-110264. The target for each branch is the October 21 release or later.

Your branch Minimum release for both CVEs
19.5 19.5.1
19.4 19.4.3
19.3 19.3.6
19.2 19.2.9
19.1 19.1.9
19.0 19.0.10
18.11 18.11.13

Anything older than 18.11 has no backported fix in GitLab's advisory, so it needs a real upgrade, not a patch.

Server room with rack-mounted machines, the kind of on-premises hardware that hosts self-managed GitLab instances

Expand

Server room with rack-mounted machines, the kind of on-premises hardware that hosts self-managed GitLab instances

Image: Esquilo via Wikimedia Commons, CC BY-SA 3.0

The checklist I'd run today

  1. Check the GitLab version your instance reports in its Admin Area and compare it with the table above.
  2. Work out how you install GitLab. Official Omnibus packages and GitLab's images carry GitLab's patched Ruby. Source installs, distribution packages and home-built images don't.
  3. If you bring your own Ruby, run ruby -v inside the same environment GitLab runs in. You need Ruby 3.3.13, 3.4.12, 4.0.9 or later. Alpine's own alpinelinux/gitlab:19.3.6 image is only fixed if it was published on October 27 or later, per Alpine.
  4. Look for crashes. GitLab published six named threat detections for CVE-2026-97229, including "Onigmo native worker crash," "ci regexp guard rejection" and "ci lint workhorse worker crash." Unexplained GitLab worker crashes and 502 errors since mid-October deserve a closer look.
  5. Review recent sign-ups. Alpine's attacker was a newly registered account. If open registration isn't needed, turn it off or require admin approval.
  6. If you were exposed and see crashes, assume the worst. Alpine's list of what could have leaked includes password hashes, 2FA secrets, CI/CD variables, runner tokens and integration credentials. Rotate them.

Who else should care

Ruby's advisory widens the circle beyond GitLab. The bugs are reached whenever an application compiles a regular expression from a string an attacker controls, for example via Regexp.new, Regexp.union, Regexp.compile or interpolation like /#{input}/. Ruby notes that Regexp.timeout doesn't protect against them, and neither does limiting pattern length, because some can be triggered by short patterns. If you run a Rails app that lets users write search patterns or filter rules, upgrade Ruby too.

CISA added this GitLab flaw on the same day as the exploited Cisco firewall bug we covered earlier, and our guide to checking Cisco ASA and FTD for CVE-2026-76418 walks through that one if it's also on your list.

Should you care?

If you run GitLab yourself, yes, today. The fix exists, it's free and it's been out since October 21. The danger now isn't the bug, it's the false sense of safety from a version number that looks right while the Ruby underneath is old. Check both layers, look at your crash logs and close open registration while you're at it. GitLab.com and Dedicated customers can relax.

Frequently Asked Questions

Is GitLab.com affected by CVE-2026-97229?

No. GitLab says GitLab.com was already running the patched version, and Dedicated tenants were patched with an internal release before the public advisory.

I upgraded to 19.4.2. Am I safe?

You're protected from CVE-2026-97229, but not from CVE-2026-110264, which GitLab fixed on October 21. Upgrade to 19.4.3 or later on that branch.

Why wasn't Alpine fixed after upgrading GitLab?

Alpine's image used standard Ruby. GitLab's fix is a patch to the Ruby it bundles, so Alpine also needed Ruby 3.3.13, 3.4.12 or 4.0.9 or later.

Was Alpine actually hacked?

Alpine says it found no evidence the attacker ran code, and its packages and releases weren't modified. It couldn't rule it out, so it rebuilt GitLab and reset passwords.

Originally published on Mango Developer.

原文:https://www.a8q9.cn/en/article/patched-gitlab-and-still-exposed-cve-2026-97229-hides-in-ruby-not-just-gitlab-dd497b.html

相关文章