Cline CLI、不正公開事件の事後報告
2026年2月17日、第三者が侵害されたnpmトークンを用いて「cline@2.3.0」を不正に公開し、後処理スクリプトで「openclaw」をグローバルインストールする改変を加えた。
Source Article
元記事を日本語で読む
本文に関係しない購読案内、埋め込み通知、サイト内プロモーションは除いています。

2026 年 2 月 17 日午前 3 時 26 分(太平洋標準時)、不正な npm パブリッシュトークンが使用され、cline@2.3.0 が npm に公開されました。このパッケージには単一の改変が含まれており、追加された postinstall スクリプト(npm install -g openclaw@latest)によって、正当なオープンソースプロジェクトである openclaw がグローバルにインストールされる仕組みとなっていました。CLI バイナリおよびその他のパッケージ内容は、前回のリリースとバイト単位で完全に一致しており、悪意のあるコードは含まれていませんでした。
同日午前 11 時 23 分までに、修正版(バージョン 2.4.0)の公開、問題のある 2.3.0 の非推奨化、および侵害されたトークンの無効化を完了しました。影響を受けた期間は約 8 時間でした。
Cline VS Code エディター拡張機能や JetBrains プラグインには影響がありません。今回の事案は Cline CLI の npm パッケージに限定されていました。
ユーザーの皆様への対応策
Cline VS Code 拡張機能または JetBrains プラグインをご利用の場合、特別な対応は不要です。これらの配布経路は侵害されていません。
npm を通じて Cline CLI をご利用の場合は、以下のコマンドでバージョンを確認してください。
cline --version
もしバージョンが 2.3.0 で、意図せず openclaw がシステムにインストールされている場合は、以下の手順で更新とクリーンアップを行ってください。
npm install -g cline@latest
npm uninstall -g openclaw
バージョン 2.4.0 以降は安全な状態となっており、各公開されたバージョンが特定の GitHub Actions ワークフロー実行およびソースコミットに紐付けられていることを示す OIDC 証明(provenance attestations)が含まれています。
cline@2.3.0 に何が含まれていたのか?
私たちは、cine@2.3.0 と正規の cline@2.2.3 を完全に比較検証しました。
CLI バイナリ(dist/cli.mjs)は、cline@2.2.3 とバイト単位で同一です。SHA256 ハッシュも正確に一致しています。
その他のパッケージファイル(tree-sitter の .wasm ファイルや README など)もすべて同じ内容でした。
唯一の変更点は package.json だけで、バージョン番号が更新され、postinstall スクリプトが追加されたのみです:"postinstall": "npm install -g openclaw@latest"
openclaw は実際に存在する非悪意性のオープンソースプロジェクトです。今回のインストールは承認されたものでも意図されたものでもありませんでしたが、セキュリティ上のリスクはありません。
影響を受けた範囲は?
- Cline CLI の npm パッケージのみ(バージョン 2.3.0)
- このバージョンをインストールしたユーザーのマシンには、openclaw がグローバルにインストールされました。
影響を受けなかった範囲は?
- Cline VS Code エディター拡張機能は一切侵害されていません。VS Code マーケットプレイスと OpenVSX のトークンは 2 月 9 日に適切に回転され、不正なバージョンがどちらのレジストリにも公開されることはありませんでした。
- Cline JetBrains プラグインも安全です。これは別個のリポジトリで管理されており、公開に必要な認証情報は今回の脆弱性を通じて一切漏洩していません。
- Cline のソースコードリポジトリも侵害されていません。脆弱性を突かれたワークフローは、コードをプッシュする権限のない一時的な環境で実行されていました。
悪意のあるコードがどのプラットフォームのユーザーにも配信されることはありませんでした。
ユーザーデータへのアクセスや不正な流出も発生していません。
どうやって起きたのか?
2025 年 12 月 21 日、GitHub の Issue を自動的に仕分けする GitHub Actions ワークフローを導入しました。このワークフローは claude-code-action を使用し、allowed_non_write_users: "*" で設定され、Bash ツールへのアクセス権限も付与されていました。つまり、GitHub ユーザーなら誰でも Issue を作成可能で、Claude がそれを読み込んでシェルコマンドを実行する能力を持って分析するという状態でした。
これにより、プロンプトインジェクションの脆弱性が生まれました。攻撃者は、Issue のタイトルに特定の指示を仕込むことで、GitHub Actions ランナー上で任意のコード実行を Claude に誘発させることが可能になります。ワークフロー自体には制限があり(リポジトリは読み取り専用、Issue は書き込み可)、デフォルトブランチで動作していたものの、夜間のリリース用ワークフローとキャッシュのスコープが共有されていました。
GitHub Actions のキャッシュは、明示的にキャッシング機能を使っていないワークフローであっても、リポジトリ内のすべてのワークフローからアクセス可能です。キャッシュエントリ自体は不変ですが、仕分けワークフロー内でコード実行権限を得た攻撃者は、キャッシュを大量に書き込むことで正当なエントリを追い出すことができます(GitHub は 10GB を超えると即座に古いエントリを削除します)。その後、夜間リリース用ワークフローが期待するキーと一致する悪意あるキャッシュエントリを仕掛けることが可能になります。夜間のワークフローが実行されると、この汚染されたキャッシュが復元され、公開シークレットへのアクセス権限を持つワークフロー内で攻撃者がコードを実行できる状態になってしまいます。
セキュリティ研究者のアドナン・カーン氏は、この脆弱性を特定し、2026 年 1 月 1 日に GitHub Security Advisory を通じて報告しました。しかし、対応がなされるまでには時間がかかり、アドナン氏が 2 月 9 日に脆弱性を公に開示するまで放置されていました。
開示からわずか 30 分以内に、私たちは脆弱性のあるワークフローを削除し、認証情報のローテーションを開始しました。VS Code マーケットプレイスと OpenVSX のトークンは正常に更新されましたが、NPM トークンの更新には失敗しました。手順の最中に誤って別のトークンを削除してしまい、漏洩したトークンがまだ有効なまま残っていたのです。npm の組織レベルのトークン管理ページでローテーションを確認しましたが、そこではアクティブなトークンはゼロと表示され、漏洩したトークンの存在は確認できませんでした。
2 月 17 日、第三者はこの依然として有効だったトークンを利用して「cline@2.3.0」を公開し、その際に openclaw という postinstall スクリプトが実行されました。ただし、このペイロード自体は無害であり、CLI バイナリの改変や悪意のあるコードの導入を試みる動きはありませんでした。
なぜこれ以外に被害がないと判断できたのか?
私たちは、暴露期間中(2025 年 12 月 21 日から 2026 年 2 月 17 日)にすべての配布チャネルで公開されたリリースを精査しました。
VS Code マーケットプレイスと OpenVSX については、この期間中に公開されたすべての拡張機能のバージョンやナイトリービルドを、リポジトリ内の git タグおよび対応する「Publish Release」や「Publish Nightly Release」という GitHub Actions ワークフローの実行履歴と照合しました。両レジストリ上のすべてのバージョンは、承認され監査可能な実行に遡ることができます。不正なバージョンがどちらのレジストリにも存在することは確認できませんでした。
npm:公開期間中にアップロードされたすべてのアーカイブをダウンロードし、対応する Git コミット時点のソースコードとファイル単位で照合しました。不正なバージョンは発見されませんでした。
JetBrains Marketplace:JetBrains プラグインは、本脆弱性を通じて漏洩したことがない独自の公開認証情報を管理する別リポジトリに存在します。完全性を確認するために監査を実施しましたが、公開期間中のすべてのバージョンに対応する Git タグと、正常に完了した GitHub Actions ワークフローが確認できました。不正なバージョンは見つかりませんでした。
ソースコードリポジトリ:公開期間中に cline リポジトリのメインブランチへ行われたすべてのコミットは、承認されたチームメンバーまたは外部コントリビューターによるものであり、プルリクエストを通じてレビューとマージを経た変更であることが確認できました。不正なコミットや強制的なプッシュ(force push)は見つかりませんでした。
再発防止策について
今回のインシデントにおける実際のユーザーへの影響は低く(悪意のないペイロード、短時間の公開期間、CLI 限定)、かつ公開認証情報が漏洩した事象自体を重く受け止めています。
すでに実施した対策:
- AI を活用した自動トリアージワークフローを完全に削除しました。今後の自動化は読み取り専用操作に限定し、シェルへのアクセス権限を持たせない方針です。
- 公開認証情報を扱うすべてのワークフローから、GitHub Actions のキャッシュ機能を削除しました。
- すべての公開認証情報を更新(ローテーション)し、古いトークンを無効化しました。
npm の公開機能は現在、GitHub Actions を介した OIDC による証明情報のみを採用しており、長期有効な npm トークンは存在しません。公開されるすべてのバージョンには、特定のソースコミットとワークフロー実行を結びつける暗号化アテステーションが含まれています。
認証情報のローテーションプロセスでは、管理ダッシュボードの確認だけでなく、実際の認証情報に対する検証(失効テストや指紋の一致確認など)が必須となっています。
現在進行中の改善策は以下の通りです。
正式な脆弱性開示および対応プロセスを確立し、セキュリティ@cline.bot への監視と GitHub Security Advisories の活用を含む明確な SLA を設定しています。
第三者のセキュリティ企業と連携し、CI/CD インフラの監査を実施して、見落としがちなギャップを特定する作業を進めています。
すべての自動化認証情報の利用を見直し、より安全な代替手段を探るとともに、これらの認証情報を変更するための承認プロセスを更新しています。
今回のインシデントは、広範なツールアクセス権を持つ AI エージェントが CI/CD パイプラインに新たな攻撃経路を生み出す具体例です。信頼できない入力を処理する CI 環境で LLM にシェルアクセスを与えることは、事実上すべての GitHub ユーザーにシェルアクセスを付与することと同義です。
個別の手法(プロンプトインジェクション、キャッシュ汚染、認証情報の窃取など)自体は新しいものではありませんが、それらの組み合わせは新たな脅威であり、業界全体がまだその防御策を習得している最中です。
今回の CI/CD の脆弱性発見と報告に尽力されたアドナン・カーン氏に感謝いたします。攻撃の連鎖、キャッシュ汚染による権限昇格経路、そして毎夜実行されるワークフローにおける侵害指標(IOC)の特定など、氏の分析は非常に詳細かつ価値あるものでした。
今回の不正な npm パッケージ公開に関する GitHub セキュリティアドバイザリは以下の URL で確認できます。
https://github.com/cline/cline/security/advisories/GHSA-9ppg-jx86-fqw7
ご質問がある場合は、security@cline.bot までお問い合わせください。
原文を表示
imageAt 3:26 AM PT on February 17th, an unauthorized party used a compromised npm publish token to publish cline@2.3.0 to npm. The published package contained a single modification: an added postinstall script (npm install -g openclaw@latest) that globally installs openclaw, a legitimate open source project. The CLI binary and all other package contents were byte-identical to the previous release. No malicious code was delivered.
By 11:23 AM PT, we had published a corrected version (2.4.0), deprecated 2.3.0, and revoked the compromised token. The exposure window was approximately 8 hours.
The Cline VS Code and Jetbrains extensions were not affected. This incident was limited to the Cline CLI npm package.
What should you do?
If you use the Cline VS Code extension or JetBrains plugin, no action is required. Those distribution channels were not compromised.
If you use the Cline CLI via npm, check your version:
cline --versionIf you're on 2.3.0 and did not intend to have openclaw installed on your system, update and clean up:
npm install -g cline@latest
npm uninstall -g openclawVersions 2.4.0 and above are clean and now include OIDC provenance attestations linking each published version to a specific GitHub Actions workflow run and source commit.
What was in cline@2.3.0?
We conducted a full forensic comparison of cline@2.3.0 against the legitimate cline@2.2.3:
The CLI binary (dist/cli.mjs) is byte-identical to cline@2.2.3. The SHA256 hash matches exactly.
All other package files (tree-sitter .wasm files, README) are identical.
The only change was in package.json: the version number was bumped and a postinstall script was added: "postinstall": "npm install -g openclaw@latest"
openclaw is a legitimate, non-malicious open source project. Its installation was not authorized or intended, but it does not pose a security risk.
What was affected?
The Cline CLI npm package only (version 2.3.0)
Users who installed this version had openclaw globally installed on their machine
What was NOT affected?
The Cline VS Code extension was not compromised at any point. The VS Code Marketplace and OpenVSX tokens were properly rotated on February 9, and no unauthorized versions were published to either registry.
The Cline JetBrains plugin was not compromised. It lives in a separate repository with separate publishing credentials that were never exposed through this vulnerability.
The Cline source code repository was not compromised. The vulnerable workflow ran in an ephemeral environment without permission to push code.
No malicious code was delivered to any user on any platform.
No user data was accessed or exfiltrated.
How did it happen?
On December 21, 2025, we added a GitHub Actions workflow to automatically triage incoming GitHub issues. The workflow used claude-code-action and was configured with allowed_non_write_users: "*" and access to the Bash tool, meaning any GitHub user could open an issue and Claude would analyze it with the ability to execute shell commands.
This created a prompt injection vulnerability. An attacker could craft an issue title containing instructions that trick Claude into running arbitrary code on the GitHub Actions runner. The workflow itself had limited GitHub permissions (read-only repo access, issues write), but because it ran on the default branch, it shared a cache scope with our nightly release workflow.
GitHub Actions caches are accessible to any workflow in a repository, even if that workflow doesn't explicitly use caching. Although cache entries are immutable, an attacker with code execution in the triage workflow could flood the cache to evict legitimate entries (GitHub evicts immediately after 10 GB). They could then plant poisoned cache entries matching the keys our nightly release workflow expected. When the nightly workflow ran, it would restore the poisoned cache, giving the attacker code execution in a workflow that had access to our publication secrets.
Security researcher Adnan Khan identified this vulnerability and reported it via GitHub Security Advisory on January 1, 2026. The report was not addressed until Adnan publicly disclosed the vulnerability on February 9. Within 30 minutes of the disclosure, we removed the vulnerable workflows and began rotating credentials. The VS Code Marketplace and OpenVSX tokens were rotated successfully. We failed to rotate the NPM token: during the process, the wrong token was deleted while the exposed one remained active. We verified the rotation through npm's org-level token management page, which showed zero active tokens, but the exposed token was not surfaced in that view.
On February 17, a third party used the still-active token to publish cline@2.3.0 with the openclaw postinstall script. The payload was benign, and no attempt was made to modify the CLI binary or introduce malicious code.
How did we verify nothing else was compromised?
We audited every release published across all four distribution channels during the full exposure window (December 21, 2025 through February 17, 2026).
VS Code Marketplace and OpenVSX: Every extension version and nightly version published during this period was cross-referenced against git tags in our repository and corresponding "Publish Release" or "Publish Nightly Release" GitHub Actions workflow runs. Every version on both registries traces back to an authorized, auditable run. No unauthorized versions were found on either registry.
npm: All tarballs published during the original exposure window were downloaded, extracted, and compared file-by-file against the source code at the corresponding git commit. No unauthorized versions were found.
JetBrains Marketplace: The JetBrains plugin lives in a separate repository with its own publishing credentials that were never exposed through this vulnerability. We audited it for completeness: all versions published during the window have corresponding git tags and successful GitHub Actions workflow runs. No unauthorized versions found.
Source repository: All commits to the cline repository main branch during the exposure window trace to authorized team members or external contributors whose changes were reviewed and merged through pull requests. No unauthorized commits or force pushes were found.
How are we preventing it from happening again?
The actual user impact here was low (benign payload, small exposure window, CLI-only), but the fact that publication credentials were compromised at all is something we're treating seriously.
Changes we've already made:
Removed the AI-powered triage workflows entirely. Any future automation will be scoped to read-only operations with no shell access.
Removed GitHub Actions cache usage from all workflows that handle publication credentials.
All publication credentials have been rotated and old tokens revoked.
npm publishing now uses OIDC provenance via GitHub Actions exclusively. There are no long-lived npm tokens. Every published version includes a cryptographic attestation linking it to a specific source commit and workflow run.
Credential rotation processes now require verification against the actual credential (testing revocation, matching fingerprints), not just checking a management dashboard.
Changes in progress:
We're establishing a formal vulnerability disclosure and response process with defined SLAs, including active monitoring for security@cline.bot and GitHub Security Advisories.
We're working with third-party security firms to audit our CI/CD infrastructure and identify gaps we might be missing.
We’re re-evaluating our use of all automation credentials, looking for more secure alternatives, and updating our approval processes for changing these credentials
This incident is a concrete example of how AI agents with broad tool access create new attack surfaces in CI/CD pipelines. Giving an LLM shell access in a CI context where it processes untrusted input is functionally equivalent to giving every GitHub user shell access. The individual techniques involved (prompt injection, cache poisoning, credential theft) aren't new, but the combination is, and it's something the industry is still learning to defend against.
Acknowledgments
We credit Adnan Khan for discovering and reporting the underlying CI/CD vulnerability. His analysis of the attack chain, including the cache poisoning escalation path and identification of indicators of compromise in our nightly workflows, was thorough and valuable.
The GitHub Security Advisory for the unauthorized npm publish is at https://github.com/cline/cline/security/advisories/GHSA-9ppg-jx86-fqw7.
If you have questions, reach out to security@cline.bot.
関連記事
今日のまとめ
AIデイリーブリーフで今日の重要ニュースをまとめ読み