CVE-2026-97229: GitLab CE/EE CI/CD Regular Expression Compiler Integer Overflow Unauthenticated Remote Code Execution (CISA KEV)
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.
HERMES THREAT SCORE & DEVSECOPS SUPPLY CHAIN TAKEOVER EVALUATION
Target:GitLab CI/CD Pipeline Regex Parsing Engine & Onigmo Bytecode Compiler 1. Vulnerability Overview & Integer Wraparound Mechanism
Section titled โ1. Vulnerability Overview & Integer Wraparound Mechanismโ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"]The Arithmetic Overflow Primitive
Section titled โThe Arithmetic Overflow Primitiveโ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.
2. Attack Vectors & Supply Chain Exploitation
Section titled โ2. Attack Vectors & Supply Chain ExploitationโIn enterprise environments, threat actors exploit CVE-2026-97229 across multiple operational scenarios:
- 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. - 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.
- Lateral Movement & Credential Harvest: Once code execution as
gitis established, the adversary extracts:- GitLab Rails database encryption keys (
db_key_basein/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.
- GitLab Rails database encryption keys (
3. Forensic Triage & Hunting Queries
Section titled โ3. Forensic Triage & Hunting Queriesโtitle: GitLab CI/CD Regex Compiler Exploit and Spawned Shellid: 8b1f9c30-4e2a-4a11-99cd-73e4b0292290status: experimentaldescription: 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-97229author: Hermes Codex Threat Intelligencedate: 2026-10-30logsource: category: process_creation product: linuxdetection: 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_userfalsepositives: - Custom custom-hooks executed by git user (require baseline verification)level: criticaltags: - attack.execution - attack.t1059 - cisa.kev// Azure Sentinel / Microsoft Defender for Linux// Detect GitLab Puma/Sidekiq Ruby engines launching unauthorized egress network connectionsDeviceNetworkEvents| where InitiatingProcessFileName in~ ("puma", "ruby", "sidekiq")| where InitiatingProcessCommandLine has "gitlab"| where RemotePort in (4444, 1337, 8080, 9001, 7000) or RemoteIPType =~ "Public"| where not(RemotePort in (80, 443, 22))| summarize ConnectionCount = count(), Destinations = make_set(RemoteIP), Ports = make_set(RemotePort) by DeviceName, InitiatingProcessCommandLine, bin(TimeGenerated, 1h)| order by ConnectionCount desc#!/usr/bin/env bash# Hermes Codex GitLab Integrity Audit & CI/CD Payload Scannerecho "[*] Scanning GitLab production logs for anomalous regex pipeline compilation..."
# Check production log for massive or malformed .gitlab-ci.yml inputsgrep -Ei "syntax error in regexp|integer overflow|onigmo.*error" /var/log/gitlab/gitlab-rails/production.log
# Audit git user running processesps -u git -o pid,user,args | grep -E "sh|bash|python|curl|wget"4. Remediation Strategy & Upgrade Instructions
Section titled โ4. Remediation Strategy & Upgrade Instructionsโ- Apply GitLab Emergency Security Release:
Upgrade immediately to one of the official security versions:- GitLab 19.4.x: Upgrade to
19.4.2or later. - GitLab 19.3.x: Upgrade to
19.3.5or later. - GitLab 19.2.x: Upgrade to
19.2.8or later.
Terminal window # For Debian/Ubuntu GitLab Omnibus:apt-get update && apt-get install --only-upgrade gitlab-ee=19.4.2-ee.0 - GitLab 19.4.x: Upgrade to
- 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.
- Rotate Potentially Compromised Secrets:
If forensic inspection reveals unauthorized shell execution undergit, 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.
- Database credentials in
5. Knowledge Graph Neighborhood
Section titled โ5. Knowledge Graph NeighborhoodโCVE-2026-97229: GitLab CE/EE CI/CD Regular Expression Compiler Integer Overflow Unauthenticated Remote Code Execution (CISA KEV)VULNERABILITY
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.”
- [vulnerability_report]
- [government_confirmation]CISA verified active exploitation in the wild and mandated federal remediation deadline in KEV entry. — Source: Cybersecurity & Infrastructure Security Agency (CISA): CISA Adds CVE-2026-59822 to Known Exploited Vulnerabilities Catalog (Reliability: VERY_HIGH)