Skip to content

CVE-2026-97229: GitLab CE/EE CI/CD Regular Expression Compiler Integer Overflow Unauthenticated Remote Code Execution (CISA KEV)

Density:
C-Level Executive Briefing CVE-2026-97229 CRITICAL SCORE 99/100

Maximum-severity CVSS 10.0 remote code execution vulnerability officially added to the CISA Known Exploited Vulnerabilities (KEV) Catalog on October 29, 2026. Designated CVE-2026-97229, the vulnerability stems from an integer wraparound condition in the regular expression compilation subsystem utilized by GitLab Community Edition (CE) and Enterprise Edition (EE) when evaluating CI/CD pipeline configurations (.gitlab-ci.yml). Unauthenticated remote attackersโ€”or low-privileged accounts on instances permitting project creation or fork workflowsโ€”can transmit specially crafted regular expression patterns combined with UTF-8 path sequences. The resulting arithmetic overflow produces a truncated memory allocation buffer; subsequent bytecode generation writes past memory bounds into the heap, executing arbitrary system commands with the privileges of the 'git' OS service account and enabling complete takeover of source repositories, CI/CD secrets, and production deployment runners.

HYBRID

HERMES THREAT SCORE & DEVSECOPS SUPPLY CHAIN TAKEOVER EVALUATION

Target: GitLab CI/CD Pipeline Regex Parsing Engine & Onigmo Bytecode Compiler
Confidence: 99%
99 / 100
CRITICAL

Measures real-world operational relevance, exploit weaponization, and active threat posture.

Dimension Breakdown
Exploitability 20 / 20
Threat Activity 20 / 20
Weaponization 20 / 20
Exposure 20 / 20
Prevalence 20 / 20
Impact 20 / 20
Exploit Maturity 20 / 20
Attack Chain Potential 20 / 20

The vulnerability was originally discovered and responsibly reported by security researcher joaxcar through GitLabโ€™s bug bounty program. It resides within the Ruby regular expression binding and parsing routine that evaluates job rules (rules:if), regex filters, and branch pattern conditions defined in .gitlab-ci.yml.

flowchart TD
A["Attacker (Unauthenticated / Untrusted Committer)"] -->|"1. Submit crafted .gitlab-ci.yml with nested regex"| B["GitLab Rails Backend (Pipeline Parser)"]
B -->|"2. Invoke Onigmo / Regex Bytecode Compiler"| C["Bytecode Length Calculation (32-bit Integer)"]
C -->|"3. Integer Wraparound: (UINT32_MAX + len) wraps to small size"| D["Truncated malloc() Allocation on Heap"]
D -->|"4. Regex Engine Emits Full Bytecode Stream"| E["Heap Buffer Overflow / Out-of-bounds Write"]
E -->|"5. Overwrite Function Pointers / Ruby Object Headers"| F["Arbitrary Code Execution as git user"]
F -->|"6. Exfiltrate CI/CD Secrets, Deploy Keys & Access Tokens"| G["Complete Enterprise Infrastructure Takeover"]

During regex compilation, the engine calculates the total buffer memory required to store compiled bytecode instructions:

/* Vulnerable arithmetic calculation pattern in regex compilation engine */
int compile_rules_pattern(const char *pattern, size_t pattern_len) {
uint32_t total_alloc_size = 0;
/* When pattern contains deeply nested alternation and multi-byte UTF-8 sequences,
the accumulated instruction length exceeds 0xFFFFFFFF (4,294,967,295 bytes) */
for (size_t i = 0; i < pattern_len; i++) {
total_alloc_size += calculate_opcode_size(pattern[i]); // Arithmetic overflow wraps around!
}
/* Malloc allocates a tiny buffer (e.g. 128 bytes instead of 4GB) */
char *bytecode_buf = (char *)malloc(total_alloc_size);
if (!bytecode_buf) return -1;
/* Out-of-bounds write: full opcode stream written into undersized buffer */
emit_compiled_opcodes(pattern, bytecode_buf); // HEAP CORRUPTION & RCE
return 0;
}

Because memory allocation is performed based on the wrapped 32-bit integer while opcode emission continues unchecked, an attacker controls the memory layout on the heap, overwriting adjacent Ruby memory structures and hijacking process execution flow.


In enterprise environments, threat actors exploit CVE-2026-97229 across multiple operational scenarios:

  1. Unauthenticated Public Registration / Open Repositories: On GitLab instances where new account creation is enabled or public project forks are permitted, attackers register throwaway accounts, push a crafted .gitlab-ci.yml, and trigger the CI pipeline linter/compiler without human review.
  2. Pull Request / Merge Request Weaponization: An external contributor submits a merge request against a public repository containing the weaponized regex in the pipeline rules, triggering server-side compilation upon webhook receipt.
  3. Lateral Movement & Credential Harvest: Once code execution as git is established, the adversary extracts:
    • GitLab Rails database encryption keys (db_key_base in /etc/gitlab/gitlab-secrets.json).
    • CI/CD environment variables, including AWS/GCP access tokens, Docker registry credentials, and Kubernetes cluster kubeconfigs.
    • Private repositories and proprietary intellectual property.

title: GitLab CI/CD Regex Compiler Exploit and Spawned Shell
id: 8b1f9c30-4e2a-4a11-99cd-73e4b0292290
status: experimental
description: Detects suspicious process creation by GitLab service accounts (git, gitlab-runner) spawning interactive shells or network utilities following pipeline processing.
references:
- https://about.gitlab.com/releases/2026/10/12/security-release-gitlab-19-4-2-released/
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?search_api_fulltext=CVE-2026-97229
author: Hermes Codex Threat Intelligence
date: 2026-10-30
logsource:
category: process_creation
product: linux
detection:
selection_parent:
ParentImage|endswith:
- '/ruby'
- '/puma'
- '/sidekiq'
ParentCommandLine|contains:
- 'gitlab'
selection_child:
Image|endswith:
- '/sh'
- '/bash'
- '/dash'
- '/python'
- '/python3'
- '/curl'
- '/wget'
- '/nc'
- '/socat'
selection_user:
User: 'git'
condition: selection_parent and selection_child and selection_user
falsepositives:
- Custom custom-hooks executed by git user (require baseline verification)
level: critical
tags:
- attack.execution
- attack.t1059
- cisa.kev

  1. Apply GitLab Emergency Security Release:
    Upgrade immediately to one of the official security versions:
    • GitLab 19.4.x: Upgrade to 19.4.2 or later.
    • GitLab 19.3.x: Upgrade to 19.3.5 or later.
    • GitLab 19.2.x: Upgrade to 19.2.8 or later.
    Terminal window
    # For Debian/Ubuntu GitLab Omnibus:
    apt-get update && apt-get install --only-upgrade gitlab-ee=19.4.2-ee.0
  2. Temporary Mitigation (Restrict New Signups and Public Projects):
    If immediate patching cannot be completed during operating hours:
    • Navigate to Admin Area > Settings > General > Sign-up restrictions and uncheck Sign-up enabled.
    • Navigate to Visibility and access controls and set Default project visibility to Private.
  3. Rotate Potentially Compromised Secrets:
    If forensic inspection reveals unauthorized shell execution under git, immediately rotate:
    • Database credentials in /etc/gitlab/gitlab-secrets.json.
    • GitLab Personal Access Tokens (PATs) and Runner registration tokens.
    • All cloud service credentials stored in group and project CI/CD variables.

๐Ÿ•ธ๏ธ Connected Knowledge Graph & Provenance

CVE-2026-97229: GitLab CE/EE CI/CD Regular Expression Compiler Integer Overflow Unauthenticated Remote Code Execution (CISA KEV)VULNERABILITY

Connected Nodes: 1
Active Relationships (Outgoing)
→ affectsPRODUCTGitLab CE / EE
98% VERY_HIGH

Complete DevOps and DevSecOps lifecycle platform providing Git repository management, CI/CD pipelines, and security automation.

๐Ÿ” Why is this related? (Evidence & Provenance)

“Confirmed security vulnerability in GitLab Community & Enterprise Edition documented in Hermes dossier.”

Supporting Verified Evidence: