← Back to All News & Security Advisories
GitLab CVSS 10.0 RCE (CVE-2026-97229): Defending Self-Hosted DevOps Against Regex Exploits
GitLab最大深刻度RCE(CVE-2026-97229):正規表現エンジンの罠と自社CI/CD基盤防護
| Critical Security Advisory
Technical breakdown of CVE-2026-97229 and CVE-2026-110264, maximum-severity (CVSS 10.0) Remote Code Execution vulnerabilities in GitLab CE/EE added to the CISA KEV catalog following active exploitation. Learn how an integer overflow in Ruby's Onigmo regular expression compiler compromises CI/CD servers, why 'System Ruby' installations remain vulnerable even after updating GitLab, and how to secure self-hosted DevOps infrastructure.
実際の悪用が確認され米国CISAのKEVカタログに追加されたGitLab CE/EEの最大深刻度(CVSS 10.0)リモートコード実行脆弱性「CVE-2026-97229」および「CVE-2026-110264」の技術解説です。Rubyの正規表現エンジン(Onigmo)における整数オーバーフローの仕組み、GitLab本体を更新しても脆弱なまま残る「システムRubyの罠」、および自社ホスト型CI/CD基盤の多層防御・越境バックアップ戦略を詳解します。
1. Executive Overview: Why Self-Hosted GitLab Instances Are Under Active Siege
Self-hosted GitLab Community Edition (CE) and Enterprise Edition (EE) servers sit at the center of enterprise engineering: they store proprietary source code, production deployment keys, container registries, and automated CI/CD pipelines. Following confirmed real-world exploitation (including high-profile intrusions against open-source distribution infrastructure such as Alpine Linux's GitLab instance), the U.S. Cybersecurity and Infrastructure Security Agency (CISA) added CVE-2026-97229 to its Known Exploited Vulnerabilities (KEV) catalog with an urgent remediation mandate.
Tracked alongside its closely related variant CVE-2026-110264, CVE-2026-97229 carries the maximum possible CVSS v3.1 base score of 10.0. An unauthenticated remote attacker can execute arbitrary operating system commands on the underlying GitLab host simply by triggering regular expression compilation through CI/CD pipeline validation endpoints or crafted '.gitlab-ci.yml' configurations.
2. Technical Mechanism: CWE-190 Integer Overflow in the Onigmo Regex Compiler
Unlike traditional web application bugs in Ruby controller logic, CVE-2026-97229 resides deep inside the native C implementation of Onigmo, the regular expression engine embedded within the Ruby runtime:
• Dynamic Regex Compilation in CI/CD: Whenever GitLab validates a pipeline definition (such as 'rules:if', 'only/except', or variable matching patterns inside .gitlab-ci.yml or via the CI Lint API), the Ruby backend passes user-supplied regular expression strings directly to Onigmo's C compiler to generate internal regex bytecode.
• Integer Wraparound During Buffer Allocation (CWE-190): By constructing a deeply nested regular expression with large repetition quantifiers and named capture groups, an attacker forces the 32-bit length calculation for the compiled bytecode buffer to overflow and wrap around to a small positive integer.
• Heap-Based Out-of-Bounds Write to RCE: Onigmo allocates a tiny heap chunk based on the wrapped integer size, then proceeds to write the full compiled regex bytecode sequence past the end of the buffer. In the context of GitLab's Puma or Sidekiq worker processes, this deterministic heap corruption overwrites adjacent Ruby object pointers, enabling reliable Remote Code Execution under the 'git' system account.
3. The 'System Ruby' Patch Trap: Why Many Updated Servers Remain Vulnerable
One of the most dangerous operational blind spots surrounding CVE-2026-97229 and CVE-2026-110264 is what security engineers call the 'System Ruby Trap':
• Omnibus & Official Docker Images: Official GitLab Omnibus packages and Cloud Native GitLab (CNG) containers bundle their own isolated, patched Ruby interpreter inside '/opt/gitlab/embedded/bin/ruby'. Upgrading an Omnibus package to 19.4.3+, 19.3.6+, or 19.2.9+ updates both the GitLab Rails code and the embedded Onigmo C library.
• Source Installations & Distro-Packaged Builds: Organizations running GitLab compiled from source, custom FreeBSD/Linux ports, or distribution-native packages (such as Arch, Alpine, or custom Debian builds) link GitLab against the host operating system's shared Ruby runtime ('/usr/bin/ruby').
• The False Sense of Security: If an administrator updates the GitLab application version on a source or distro-packaged installation without separately upgrading the underlying host Ruby package (to Ruby 3.3.13+, 3.4.12+, or 4.0.8+ containing the patched Onigmo engine), the GitLab web UI will display a 'patched' version number while the server remains 100% vulnerable to CVSS 10.0 exploitation.
- Unauthenticated Attack Surface: If public sign-ups, public project imports, or unauthenticated CI Lint API endpoints are reachable on the internet, attackers require zero prior credentials.
- Complete Supply Chain Compromise: Once an attacker gains shell access as the 'git' user, they can inject malicious backdoors into every hosted repository, steal CI/CD secret variables (AWS/GCP credentials, SSH keys), and poison downstream production deployments.
- Lateral Pivot into Production Networks: Self-hosted GitLab runners frequently hold privileged access to internal Kubernetes clusters and production VLANs.
4. Remediation Verification, DevOps Hardening & Air-Gapped Backup Resilience
Protecting enterprise DevOps infrastructure against CVE-2026-97229 and CVE-2026-110264 requires four immediate engineering actions:
• Upgrade Both GitLab and the Underlying Ruby Runtime: Upgrade GitLab CE/EE immediately to the latest patch releases (19.5.1, 19.4.3, 19.3.6, 19.2.9, or later) so both CVE-2026-97229 and the follow-up variant CVE-2026-110264 are remediated. On non-Omnibus installations, explicitly verify the Ruby binary powering Puma and Sidekiq ('lsof -p <puma_pid> | grep libruby') to confirm the host Ruby runtime is patched.
• Remove Self-Hosted GitLab from the Public Internet: Development repositories and CI/CD control planes should never be exposed directly to untrusted internet traffic. Place GitLab behind a strict VPN, zero-trust access proxy, or IP-allowlisted Nginx reverse proxy, and disable public account registration.
• Audit for Post-Exploitation Indicators of Compromise (IoCs): Inspect '/var/log/gitlab/gitlab-rails/production_json.log' and NGINX access logs for abnormal POST requests to '/api/v4/ci/lint' or 'project/ci/lint' containing oversized payloads, and audit all SSH deploy keys, personal access tokens, and webhook URLs created since mid-October 2026.
• Deploy Air-Gapped, Cross-Region Repository Backups: Because a compromised GitLab server allows an attacker with 'git' or 'root' access to wipe local backups and corrupt Git history, Entinux provides automated, immutable (WORM) snapshot backups replicated across geographically isolated data centers in Hong Kong, Japan, the US, the UK, and Germany, paired with 24x7 Entinux NMS process and network telemetry.
1. 脆弱性の概要:自社運用のGitLabサーバーを襲う「CVSS 10.0」の緊急事態
企業のソースコード、SSHデプロイ鍵、コンテナレジストリ、そして本番環境への自動デプロイ(CI/CD)パイプラインを一元管理する自己ホスト型(オンプレミス/プライベートクラウド)のGitLab(CE/EE)において、最大深刻度となる「CVSS 10.0」のリモートコード実行(RCE)脆弱性「CVE-2026-97229」および関連脆弱性「CVE-2026-110264」が公表されました。
本脆弱性は公開直後から実際のサイバー攻撃に悪用されており(Alpine Linuxプロジェクトの公式GitLab基盤に対する侵害事案など)、米国CISA(サイバーセキュリティ・インフラストラクチャセキュリティ庁)も悪用確認済み脆弱性カタログ(KEV)へ緊急追加しました。認証を持たない遠隔の攻撃者が、細工した正規表現を含むCI/CD設定(.gitlab-ci.yml等)の検証リクエストを送りつけるだけで、GitLabサーバー上で任意のOSコマンドを実行できる極めて危険な状態です。
2. 深層技術解説:Ruby正規表現エンジン「Onigmo」における整数オーバーフロー(CWE-190)
CVE-2026-97229の本質は、GitLabのWeb画面(Rails層)の論理バグではなく、土台となるRubyランタイムの内部でC言語により実装されている正規表現エンジン「Onigmo」のメモリ破壊バグにあります。
• CI/CDパイプライン解析時の動的コンパイル:GitLabは、パイプライン定義ファイル(.gitlab-ci.yml)内の「rules:if」やブランチ名・変数マッチングルールの構文検証(CI Lint APIを含む)を行う際、ユーザーが記述した正規表現文字列をRubyのOnigmoエンジンへ渡して内部バイトコードへコンパイルします。
• バイトコード長計算における整数オーバーフロー(CWE-190):攻撃者が深いネスト構造や巨大な繰り返し量指定子(Quantifier)、名前付きキャプチャグループを組み合わせた特殊な正規表現を入力すると、コンパイル後のバイトコード格納に必要なメモリサイズを計算する32ビット整数がオーバーフローを起こし、極端に小さな正の数値へとラップアラウンド(桁あふれ)します。
• ヒープ領域の境界外書き込みからRCEへ:Onigmoは桁あふれした小さなサイズでヒープメモリを確保し、そこへ本来の巨大なバイトコード列を書き込んでしまいます。これによりGitLabのPumaやSidekiqワーカープロセスのヒープ領域が破壊され、隣接するRubyオブジェクトの関数ポインタ等を書き換えることで、「git」システムユーザー権限での任意コード実行(RCE)が成立します。
3. 最大の落とし穴『システムRubyの罠』:GitLabを更新しても脆弱なまま残るケース
今回のインシデント対応において、多くのインフラ管理者が陥っている致命的な盲点が「システムRubyの罠(System Ruby Trap)」です。
• 公式Omnibusパッケージ・公式Dockerイメージの場合:GitLab公式のOmnibusパッケージやCNGコンテナは、「/opt/gitlab/embedded/bin/ruby」として修正済みの独自Rubyランタイムを内蔵しています。そのため、パッケージを修正版(19.5.1、19.4.3、19.3.6、19.2.9以降)へ更新すれば、Onigmoエンジンも同時に修正されます。
• ソースビルドやディストリビューション独自パッケージの場合:一方で、ソースコードから構築した環境や、OSディストリビューション標準のパッケージ機構を用いてGitLabを稼働させている環境では、GitLabはOS側の共有Rubyランタイム(/usr/bin/ruby等)を参照して動作します。
• 見かけ上の「パッチ適用済み」という危険:このような環境では、GitLabアプリケーション側のバージョンだけを最新に引き上げても、ホストOS側のRubyパッケージ自体(Ruby 3.3.13、3.4.12、4.0.8等の修正版)を別途アップデートしない限り、脆弱なOnigmoライブラリがメモリ上に読み込まれ続けます。管理画面上では最新バージョンと表示されているにもかかわらず、実際にはCVSS 10.0の攻撃に対して完全に無防備なまま放置される事態が多発しています。
- 認証不要の攻撃経路:パブリック登録が有効な環境や、認証なしで到達可能なCI Lintエンドポイントが存在する場合、外部からアカウントなしで即座に攻撃可能です。
- ソフトウェアサプライチェーン全体の汚染:gitユーザー権限を奪取されると、全リポジトリへのバックドア混入、CI/CDシークレット変数(クラウドAPI鍵やSSH秘密鍵)の窃取、本番環境への不正デプロイが連鎖的に発生します。
- 社内ネットワークへの横展開(ラテラルムーブメント):GitLab Runnerが本番Kubernetesクラスタや社内VLANへの特権を持っている場合、開発基盤から本番基盤全体が一気に制圧されます。
4. 恒久対策、侵害調査(フォレンジック)、および越境・不変バックアップによる保護
自社でGitLabやCI/CD基盤を運用している組織は、直ちに以下の4つの対策を実施してください。
• GitLab本体とRubyランタイム双方の完全更新:CVE-2026-97229だけでなく、直後に判明した関連RCE脆弱性「CVE-2026-110264」も同時に塞ぐため、最新パッチ(19.5.1、19.4.3、19.3.6、19.2.9以降)へ即座にアップデートしてください。また、実行中のPumaプロセスがリンクしているlibrubyの実体を確認し、OS側のシステムRubyが使われている場合はRuby自体を確実に更新してください。
• GitLabのインターネット直接公開の廃止:開発資産の心臓部であるGitLabをパブリックインターネットへ直接晒す運用を見直し、VPN経由、ゼロトラストプロキシ、またはIP制限を施したNginxリバースプロキシの背後に隔離してください。
• 侵害痕跡(IoC)の緊急監査:「/var/log/gitlab/gitlab-rails/production_json.log」やWebアクセスログを精査し、「/api/v4/ci/lint」等に対する不審な大容量POSTリクエストの有無を確認するとともに、2026年10月中旬以降に追加された不審なSSH鍵、アクセストークン、管理者アカウント、Webhook設定を総点検してください。
• Entinuxによる24時間365日監視とオフライン・越境バックアップ:万一GitLabサーバーの権限を奪取された場合、同一サーバー上やマウントされたNAS上のローカルバックアップは攻撃者によって容易に消去・暗号化されます。Entinuxは香港、日本、米国、英国、ドイツのデータセンターを活用した低コストかつ書き換え不能(WORM)な越境スナップショットバックアップと、Entinux NMSによる24時間365日の異常プロセス検知を提供し、企業の最重要資産であるソースコードと開発基盤を確実に保護します。