Alpine's GitLab and CVE-2026-97229: Why Upgrading GitLab Was Not Enough
CVE-2026-97229 is a critical GitLab flaw in Ruby's Onigmo regex engine that can allow code execution through crafted CI configuration. Alpine Linux's self-hosted GitLab was targeted on October 20 and 21, 2026, after upgrades that missed the fix, which ships as a patch to GitLab's bundled Ruby. Alpine rebuilt the server and rotated every credential.
The vulnerability, per GitLab
GitLab disclosed CVE-2026-97229 in its October 12, 2026 patch release (19.4.2, 19.3.5, 19.2.8). GitLab rates it critical, CVSS 10.0 (network attack vector, no privileges or user interaction required, scope changed, high impact across the board), and titles it an integer overflow in the CI/CD regular expression compiler. Under certain conditions an unauthenticated user could execute arbitrary code on the GitLab server with a crafted regular expression in a CI/CD configuration. Affected: 19.2 before 19.2.8, 19.3 before 19.3.5, and 19.4 before 19.4.2. GitLab.com and GitLab Dedicated were already patched.
The flaw sits in Onigmo, the regular expression engine built into Ruby, not in GitLab's own code. The release notes list Ruby regexp patches for Ruby 3.3 and 3.4 among the bug fixes, and GitLab published threat detections for self-managed instances, including one for Onigmo native worker crashes. Upstream Ruby shipped the fixes on October 23 in 3.3.13, 3.4.12, and 4.0.9, describing them as regexp compilation fixes related to four GitLab CVEs, this one included, and as an exception to Ruby 3.3's security-only maintenance policy.
CISA added CVE-2026-97229 to the Known Exploited Vulnerabilities catalog on October 29, with a federal due date of November 1. For what that listing means for prioritisation, see CVE vs KEV.
What happened at Alpine Linux
Alpine Linux runs its own GitLab at gitlab.alpinelinux.org. Its incident post, dated October 28 and updated October 30, is the clearest public account of exploitation so far. The timeline, as Alpine reported it:
- Oct 12: GitLab releases the fix.
- Oct 13: Alpine upgrades, but to 19.3.4 instead of the fixed 19.3.5, by mistake.
- Oct 20 to 21: A newly registered account submits crafted CI configurations. GitLab workers crash eight times; in four crashes the attacker got partway through the exploit before it failed. The attacker also downloaded Alpine's GitLab container image, which suggests tuning to that build.
- Oct 22: Alpine upgrades to 19.3.6. It is still vulnerable, because Alpine's image used standard Ruby.
- Oct 23: The account is blocked. Upstream Ruby ships the fix.
- Oct 25 to 26: The attacker returns and fails. Alpine finds the instance still vulnerable.
- Oct 27 to 29: GitLab is closed to all but developers and build servers, rebuilt from scratch, and reopened on 19.3.7 running a patched Ruby, which Alpine gives as 3.3.13 or later.
Alpine found no evidence of code execution but says it cannot rule it out. Some logs from the attack day are missing.
Why upgrading GitLab was not enough
Two separate failures kept the instance exposed, and the second is the one worth generalising.
The first was ordinary: an upgrade to the wrong patch version. A version check against the advisory would have caught it.
The second was structural. GitLab's fix was a patch to the Ruby that GitLab bundles, and GitLab applies that patch only in its official packages and images. Alpine builds its own image on the distribution's Ruby. So the GitLab version string said 19.3.6, a fixed release, while the vulnerable code still ran. Any scanner or dashboard that compares the GitLab version against the advisory would have marked the host remediated.
The general rule: when a vendor ships a fix as a patch to a bundled runtime or library, every build that does not use the vendor's bundle inherits the version number without the fix. That covers distribution packages, custom container images, and source installs. Verify the fixed component, not the headline version. How to check whether a CVE affects you walks through doing that against an inventory.
Why Alpine rebuilt instead of patching in place
Alpine could not rule out code execution, and the evidence that would have settled it was gone. In that position, patching the running server leaves any implant in place. Rebuilding from scratch is the defensible choice, and the scoping that followed is a good template.
Alpine listed what the server held if the exploit had succeeded: user emails, names and IPs; password hashes; 2FA secrets; CI/CD variables and runner tokens; webhook, integration and push mirror credentials; personal access token hashes; private repositories and confidential issues. Then it rotated all of it. Passwords and 2FA were reset for every account, old access tokens were invalidated, CI/CD variable values were emptied for owners to re-enter, integration secrets had to be re-entered, and the SSH host keys changed.
It also checked the thing a distribution cares about most. Alpine verified its aports repository, the packages built October 20 to 24, and the October 21 releases against records outside GitLab, and found no tampering. Its signing keys were never stored on the GitLab server. That separation is what made the supply chain question answerable.
What to do if you run self-managed GitLab
- Confirm the deployment type. Official Omnibus packages and GitLab's own images at 19.2.8, 19.3.5, 19.4.2 or later carry the patched Ruby. Anything built on another Ruby also needs Ruby 3.3.13, 3.4.12, 4.0.9 or later. Alpine's guidance for its own image is to pull
alpinelinux/gitlab:19.3.6again; images published October 27 contain Ruby 3.3.13, and earlier 19.3.6 images and older tags remain vulnerable. - Close open registration. GitLab describes the flaw as reachable without authentication, and Alpine's attacker simply registered an account. Alpine now requires admin approval for new accounts. Requiring approval does not fix the bug; it removes an easy path to it.
- Hunt for the signal Alpine saw. Native worker crashes in the regex path, bursts of 502s, and failed CI jobs from new accounts. GitLab published detections for self-managed instances; use them.
- Treat an exposed, unpatched window as a possible compromise. If the instance was internet-facing and vulnerable after exploitation began, scope what it holds and rotate, as Alpine did.
The pressure to move fast is real; exploitation that follows a patch by hours is now the normal case for critical, internet-facing software.
Alpine's planned changes, as a checklist
Alpine's own follow-ups read like a postmortem action list that generalises to any self-hosted forge:
- Apply critical GitLab security releases within a day, and check each release for component patches the build must apply.
- Run the fixed Ruby.
- Log outbound and database connections, and keep logs longer than 14 days.
- Sign release tags so releases can be verified independently of GitLab.
The last two are the ones most teams lack. Without outbound logs, "no evidence of exfiltration" means little. Without signed tags, a compromised forge forces a manual audit of everything it touched.
Frequently asked questions
- What is CVE-2026-97229?
- CVE-2026-97229 is a critical GitLab CE/EE vulnerability, CVSS 10.0, disclosed on October 12, 2026. GitLab describes it as an integer overflow in the CI/CD regular expression compiler that could let an unauthenticated user execute code on the server through a crafted regular expression in CI configuration. The underlying bug is in Onigmo, the regex engine built into Ruby.
- Was Alpine Linux's GitLab compromised?
- Alpine reports that an attacker attempted exploitation on October 20 and 21 and came close, crashing GitLab workers eight times. Alpine found no evidence of code execution but could not rule it out because some logs were missing, so it rebuilt the server, reset all credentials, and verified its packages and releases against outside records, finding no tampering.
- Why did upgrading GitLab not fix CVE-2026-97229?
- The fix is a patch to the Ruby that GitLab bundles, applied only in GitLab's official packages and images. Alpine's image used the distribution's standard Ruby, so GitLab 19.3.6 still ran the vulnerable regex engine. Installs on their own Ruby also need Ruby 3.3.13, 3.4.12, 4.0.9 or later, per Alpine's guidance.
- Is CVE-2026-97229 in the CISA KEV catalog?
- Yes. CISA added CVE-2026-97229 to its Known Exploited Vulnerabilities catalog on October 29, 2026, listing it as a GitLab CE and EE integer overflow or wraparound vulnerability, with a federal remediation due date of November 1, 2026. Known ransomware use is listed as unknown. The short deadline reflects confirmed exploitation and the severity of the flaw.