Git Push パイプラインの保護:重大なリモートコード実行脆弱性への対応
GitHubは2026年3月4日、Gitプッシュパイプラインにおける深刻なリモートコード実行脆弱性を2時間以内に検出・修正し、セキュリティ対応の迅速性と透明性を示した。
キーポイント
深刻な脆弱性の発見
Wizのバグバウンティ報告により、GitHubのGitプッシュ処理でユーザーが任意のコマンドを実行できるリモートコード実行脆弱性が発覚。
迅速な対応と修正
報告から40分で再現、同日19時UTCにgithub.comに修正を適用。GitHub Enterprise Server向けも即時パッチ提供。
脆弱性の技術的根拠
ユーザーが指定するGitプッシュオプションの値が内部メタデータに不適切に組み込まれ、デリミタ文字を介して信頼できないフィールドを挿入可能だった。
セキュリティの根本的改善
修正ではユーザー入力の適切なサニタイズを確保し、内部メタデータの改ざんを防ぐ仕組みを強化。
影響範囲と対応策
github.com、GitHub Enterprise Cloud、GitHub Enterprise Server(複数バージョン)が影響。CVE-2026-3854として公開され、即時アップグレードが推奨。
悪意のある利用の有無をテレメトリで確認
この脆弱性のエクスプロイトは通常の操作では使われないコードパスを強制するため、ログで異常な実行を検出でき、研究者によるテスト以外に利用の痕跡は確認されなかった。
防御の多層化の重要性
不要なコードパスが環境に残っていたことで脆弱性の影響が拡大したため、不要なコードの削除による追加のハードニングが有効であることが示された。
影響分析・編集コメントを表示
影響分析
この脆弱性は、開発者の日常的なGit操作がサーバー制御に繋がるという極めて深刻なリスクを示しており、ソフトウェア開発の基盤であるGitのセキュリティがいかに重要かを改めて浮き彫りにした。GitHubの迅速な対応は、DevSecOpsの実践モデルとして他社に大きな示唆を与える。
編集コメント
この対応は、AI/ML開発におけるコード管理の信頼性を支える基盤として、極めて重要な教訓を提供している。
2026 年 3 月 4 日、Wiz の研究者から Bug Bounty プログラムを通じて、github.com、GitHub Enterprise Cloud、データ所在地を指定した GitHub Enterprise Cloud、エンタープライズ管理ユーザーを有する GitHub Enterprise Cloud、および GitHub Enterprise Server に影響を与える重大なリモートコード実行脆弱性に関する報告を受けました。
2 時間足らずで発見を検証し、github.com への修正をデプロイするとともに、悪用はなかったと結論付けた法医学調査を開始しました。
本稿では、何が起きたか、どのように対応したか、そして将来同様の問題を防止するために何をしているかを共有します。
Bug Bounty 報告の受領
この Bug Bounty 報告書には、リポジトリへのプッシュ権限を持つユーザー(自身が作成したリポジトリを含む)が、git push 操作を処理する GitHub サーバー上で任意のコマンド実行を実現できる方法が記載されていました。攻撃には、単一の命令、すなわち未検証の文字を利用した巧妙に作られたプッシュオプションを使用した git push コマンドのみが必要でした。
当社のセキュリティチームは直ちに Bug Bounty 報告書の検証を開始しました。40 分以内に内部で脆弱性を再現し、その重大性を確認しました。これは即座の対応を要する重大な問題でした。
脆弱性の理解
ユーザーが GitHub にコードをプッシュすると、その操作は複数の内部サービスを経由します。このプロセスの一環として、リポジトリの種類や処理環境など、プッシュに関するメタデータが内部プロトコルを使用してサービス間でやり取りされます。
この脆弱性は、このメタデータ内でユーザーが提供した git プッシュオプション(push options)の扱い方を悪用するものです。プッシュオプションは、クライアントがプッシュ時にサーバーへキー・バリュー文字列を送信できるようにする意図的な機能ですが、ユーザーが提供する値は十分なサニタイズ(sanitization:入力値の無害化処理)なしに内部メタデータに取り込まれていました。内部メタデータ形式で使用される区切り文字が、ユーザー入力にも現れる可能性があるため、攻撃者は追加フィールドを注入し、下流サービスがそれを信頼できる内部値として解釈するように仕向けることが可能でした。
複数の注入された値を連鎖させることで、研究者らは攻撃者がプッシュ処理環境を上書きし、通常フックの実行を制限するサンドボックス保護(sandboxing)を迂回し、最終的にサーバー上で任意のコマンドを実行できることを実証しました。
脆弱性への対応
根本原因は 2026 年 3 月 4 日午後 5 時 45 分 UTC に特定され、エンジニアリングチームはその同日午後 7 時 UTC に github.com に対して修正を適用・展開しました。この修正により、ユーザーが提供したプッシュオプションの値は適切にサニタイズされるようになり、もはや内部メタデータフィールドに影響を与えることはできなくなりました。
GitHub Enterprise Server については、すべてのサポート対象リリース(3.14.25, 3.15.20, 3.16.16, 3.17.13, 3.18.8, 3.19.4, 3.20.0 以降)に対してパッチを準備し、CVE-2026-3854 を公開しました。これらは本日利用可能であり、すべての GHES(GitHub Enterprise Server)のお客様に直ちにアップグレードすることを強く推奨します。
悪用の調査
github.com における即時の修正完了後、我々は研究者が報告する前に他の誰かがこの脆弱性を見つけ、悪用したかどうかという差し迫った問いへの回答に移りました。
この脆弱性の重要な特性により、その質問に答える能力について確信を持つことができました。このエクスプロイト(攻撃コード)は、github.com での通常運用時には決して使用されないサーバーのコードパスを実行させるものです。これは注入の仕組みに伴う必然的な結果であるため、攻撃者が回避したり抑制したりすることはできません。
我々はこのコードパスをログに記録し、テレメトリデータ(監視・分析データ)を検索して、この異常なコードパスが実行された事例がないか確認しました。その結果は明確でした:
すべての発生事例は Wiz 社の研究者自身によるテスト活動に対応していました。
他のユーザーやアカウントがこのコードパスをトリガーしたことはありませんでした。
この脆弱性により顧客データがアクセスされたり、改ざんされたり、外部へ持ち出されたりすることはありませんでした。
GHES お客様の場合、悪用にはインスタンス上でプッシュ権限を持つ認証済みユーザーが必要です。念のため、アクセスログの確認を推奨します。
多層防御
即時的な入力サニタイズ(無害化処理)の問題を修正するだけでなく、今回の調査で共有すべき追加的な発見が明らかになりました。
この攻撃が部分的に成功したのは、サーバーが本来その実行環境向けではないコードパスにアクセスできていたためです。このコードパスは、異なる製品構成でのみ使用されるべきものにもかかわらず、サーバーのコンテナイメージの一部としてディスク上に存在していました。古いデプロイメント方法では正しくこのコードが除外されていましたが、デプロイモデルが変更された際に、その除外処理が引き継がれていませんでした。
これは、多層防御(Defense in Depth)の重要性を思い起こさせる有用な事例です。入力サニタイズ(sanitization)による修正が主要な対策ですが、不要なコードパスが存在すべきではない環境からこれを削除しました。将来同様のインジェクション脆弱性が発見された場合でも、この追加的な強化により、攻撃者がそれを利用できる範囲を制限できます。
あなたが取るべき行動
GitHub Enterprise Cloud、Enterprise Managed Users を使用した GitHub Enterprise Cloud、Data Residency 機能を備えた GitHub Enterprise Cloud、および github.com は 2026 年 3 月 4 日にパッチ適用済みです。これらのいずれかのユーザーが取るべきアクションはありません。
前述の通り、GitHub Enterprise Server での攻撃には、インスタンス上でプッシュ権限を持つ認証済みユーザーが必要です。プッシュオプションに「;」が含まれるプッシュ操作について、/var/log/github-audit.log の確認を推奨します。以下のリリースで更新プログラムが利用可能です:
GitHub Enterprise Server 3.14.25 以降
GitHub Enterprise Server 3.15.20 以降
GitHub Enterprise Server 3.16.16 以降
GitHub Enterprise Server 3.17.13 以降
GitHub Enterprise Server 3.18.7 以降
GitHub Enterprise Server 3.19.4 以降
GitHub Enterprise Server 3.20.0 以降
できるだけ早く最新のパッチリリースへのアップグレードを強く推奨します。詳細については、GHES リリースノート(GitHub Enterprise Server Release Notes)をご覧ください。
本脆弱性には CVE-2026-3854 が割り当てられています。
謝辞
本脆弱性は Wiz の研究者によって発見され、責任ある開示が行われました。彼らの報告は徹底しており、影響を明確に実証したことで、検証から対策までの迅速な移行を可能にしました。この発見は、過去 10 年以上にわたり当社のセキュリティプログラムの基盤となっているバグ報奨プログラム(Bug Bounty Program)の歴史において、最高レベルの報酬の一つとして授与されます。
「git push パイプラインの保護:重大なリモートコード実行脆弱性への対応」という記事は、最初に The GitHub Blog で公開されました。
原文を表示
On March 4, 2026, we received a vulnerability report through our Bug Bounty program from researchers at Wiz describing a critical remote code execution vulnerability affecting github.com, GitHub Enterprise Cloud, GitHub Enterprise Cloud with Data Residency, GitHub Enterprise Cloud with Enterprise Managed Users, and GitHub Enterprise Server.
In less than two hours we had validated the finding, deployed a fix to github.com, and begun a forensic investigation that concluded there was no exploitation.
In this post, we want to share what happened, how we responded, and what we are doing to prevent similar issues in the future.
Receiving the bug bounty report
The bug bounty report described a way for any user with push access to a repository, including a repository they created themselves, to achieve arbitrary command execution on the GitHub server handling their git push operation. The attack required only a single command: git push with a crafted push option that leveraged an unsanitized character.
Our security team immediately began validating the bug bounty report. Within 40 minutes, we had reproduced the vulnerability internally and confirmed the severity. This was a critical issue that required immediate action.
Understanding the vulnerability
When a user pushes code to GitHub, the operation passes through multiple internal services. As part of this process, metadata about the push, such as the repository type and the environment it should be processed in, is passed between services using an internal protocol.
The vulnerability leveraged how user-supplied git push options were handled within this metadata. Push options are an intentional feature of git that allow clients to send key-value strings to the server during a push. However, the values provided by the user were incorporated into the internal metadata without sufficient sanitization. Because the internal metadata format used a delimiter character that could also appear in user input, an attacker could inject additional fields that the downstream service would interpret as trusted internal values.
By chaining several injected values together, the researchers demonstrated that an attacker could override the environment the push was processed in, bypass sandboxing protections that normally constrain hook execution, and ultimately execute arbitrary commands on the server.
Responding to the vulnerability
With the root cause identified on March, 4, 2026, at 5:45 p.m. UTC, our engineering team developed and deployed a fix to github.com at 7:00 p.m. UTC that same day. The fix ensures that user-supplied push option values are properly sanitized and can no longer influence internal metadata fields.
For GitHub Enterprise Server, we prepared patches across all supported releases (3.14.25, 3.15.20, 3.16.16, 3.17.13, 3.18.8, 3.19.4, 3.20.0, or later) and published CVE-2026-3854. These are available today and we strongly recommend that all GHES customers upgrade immediately.
Investigating for exploitation
With the immediate fix in place on github.com, we moved to the pressing question of whether anyone else found and exploited this vulnerability before the researchers reported it.
A key property of this vulnerability gave us confidence in our ability to answer that question. The exploit forces the server to take a code path that is never used during normal operations on github.com. This is not something an attacker can avoid or suppress, as it is an inherent consequence of how the injection works.
We logged this path and queried our telemetry for any instance of this anomalous code path being executed. The results were clear:
Every occurrence mapped to the Wiz researchers’ own testing activity.
No other users or accounts triggered this code path.
No customer data was accessed, modified, or exfiltrated as a result of this vulnerability.
For GHES customers, exploitation would require an authenticated user with push access on your instance. We recommend reviewing your access logs out of an abundance of caution.
Defense in depth
Beyond fixing the immediate input sanitization issue, our investigation surfaced an additional finding worth sharing.
The exploit worked in part because the server had access to a code path that was not intended for the environment it was running in. This code path existed on disk as part of the server’s container image, even though it was only meant to be used in a different product configuration. An older deployment method had correctly excluded this code, but when the deployment model changed, the exclusion was not carried forward.
This is a useful reminder that defense in depth matters. The input sanitization fix is the primary remediation, but we have also removed the unnecessary code path from environments where it should not exist. Even if a similar injection vulnerability were discovered in the future, this additional hardening would limit what an attacker could do with it.
What you should do
GitHub Enterprise Cloud, GitHub Enterprise Cloud with Enterprise Managed Users, GitHub Enterprise Cloud with Data Residency, and github.com were patched on March 4, 2026. No action is required from users of any of these.
As mentioned previously, exploitation on GitHub Enterprise Server requires an authenticated user with push access on your instance. We recommend that you review /var/log/github-audit.log for push operations containing ; in push options. Updates are available in the following releases:
GitHub Enterprise Server 3.14.25 or later
GitHub Enterprise Server 3.15.20 or later
GitHub Enterprise Server 3.16.16 or later
GitHub Enterprise Server 3.17.13 or later
GitHub Enterprise Server 3.18.7 or later
GitHub Enterprise Server 3.19.4 or later
GitHub Enterprise Server 3.20.0 or later
We strongly recommend upgrading to the latest patch release as soon as possible. See the GHES release notes for details.
This vulnerability has been assigned CVE-2026-3854.
Acknowledgments
This vulnerability was discovered and responsibly disclosed by researchers at Wiz. Their report was thorough, clearly demonstrated the impact, and enabled us to move quickly from validation to remediation. This finding will receive one of the highest rewards in the history of our Bug Bounty program, which has been a cornerstone of our security program for over a decade.
The post Securing the git push pipeline: Responding to a critical remote code execution vulnerability appeared first on The GitHub Blog.
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み