PyPIサプライチェーン攻撃によりLiteLLMが侵害、機密情報の流出を可能に
PyPI上のAIツールライブラリLiteLLMに対するサプライチェーン攻撃により、悪意のあるバージョンが4万回以上ダウンロードされ、機密情報を収集・外部送信するペイロードがインストールされた可能性がある。
キーポイント
大規模なサプライチェーン攻撃の発生
PyPI上の人気AIライブラリLiteLLMが標的となり、悪意のあるバージョンが4万回以上ダウンロードされた。
深刻な情報漏洩リスク
攻撃によりインストールされたマルウェアは、機密情報を収集し外部に送信する能力を持っていた。
広範な影響範囲
LiteLLMは1日あたり約300万回ダウンロードされる人気ライブラリであり、潜在的な被害規模は大きい。
セキュリティ研究者による発見
FutureSearchの研究者Callum McMahonによってこの攻撃が発見・報告された。
影響分析・編集コメントを表示
影響分析
この攻撃は、AI開発において広く利用されるオープンソースライブラリのサプライチェーンが脆弱であることを露呈し、開発者コミュニティ全体にセキュリティ意識の向上を迫る重大な事例となった。特にLiteLLMのような高頻度で利用されるツールが標的となったことで、AIシステム開発における依存関係管理の重要性が改めて浮き彫りになった。
編集コメント
AI開発の民主化が進む中で、オープンソースエコシステムのセキュリティガバナンスが重大な課題として浮上している。開発者は常に依存パッケージの出所と完全性を確認する習慣が必要だ。
FutureSearch の研究者であるカラム・マクマホン氏によって発見された、PyPI 上の LiteLLM に対するサプライチェーン攻撃により、機密情報を収集・流出させる悪意のあるペイロードをインストールする改ざん版が 4 万回以上ダウンロードされました。LiteLLM は1日あたり約300万回ダウンロードされています。
アンドレイ・カルパティ氏が X で指摘したように、このマルウェアは SSL および SSH キー(SSL/SSH keys)、クラウドプロバイダーの認証情報、Kubernetes 設定、Git の認証情報、API キー、シェル履歴、暗号化ウォレットなど、多くの種類の秘密情報を流出させる能力を持っていました。
マクマホン氏によると、この攻撃は litellm 1.82.8 パッケージに影響を与えました:
私のマシンが激しくフリーズし始めました。48GB の Mac でそんなことが起こるはずはありません。htop が読み込みに数十秒かかり、CPU が 100% に張り付いていました。これはしばらくローカル環境で作業を続ける必要があるという兆候でした…ソフトウェアによるリセットに失敗した後、証拠として最後の写真を撮影し、ハードリセットを行いました。
改ざんされたパッケージを直ちに PyPI セキュリティチームおよび LiteLLM のメンテナに報告した結果、影響を受けたパッケージは約 40 分以内に隔離されました。しかし、リスクはさらに広がっており、litellm バージョン 1.82.8 に依存するすべてのパッケージも間接的に侵害されていました。
マクマホン氏によると、システムが侵害された原因は、Cursor を介してローカルの MCP サーバーを起動しただけだった。これにより、直前にわずか数分前に侵害されていた最新の LiteLLM パッケージのダウンロードがトリガーされた。しかし、マルウェア自体の実装における欠陥により、LiteLLM プロセスが再帰的にフォークされ、最終的にはマクマホン氏のシステムが完全に停止した:
.pth ランチャーは subprocess.Popen を介して子 Python プロセスを起動するが、.pth ファイルはすべてのインタプリタ起動時にトリガーされるため、子が同じ .pth を再度トリガーし、指数関数的なフォークボムを引き起こしてマシンをクラッシュさせた。
この実装上のミスがなければ、マルウェアはもっと長く検知されずに済み、より甚大な被害をもたらした可能性があったと、カルパシー氏は指摘している。
AI 駆動のサイバーセキュリティを提供する Point Wild は、開発者が依存関係への影響を評価できるよう、依存関係スキャナをオープンソース化した。このツール「who-touched-my-packages (wtmp)」は、行動分析と AI ドライブ型の検知を組み合わせて、従来の脆弱性チェッカーではカバーしきれないゼロデイサプライチェーン脅威を検出する。
FutureSearch は、パッケージメンテナがサプライチェーン攻撃の影響を受けたかどうかを判断できるよう、「litellm-checker」ツールをリリースした。
LiteLLM チームは、このサプライチェーン攻撃が Trivy における脆弱性を悪用することで可能になったと報告している。これにより、攻撃者は LiteLLM の公開パイプラインへの不正アクセスを獲得することができた。
サプライチェーン攻撃およびマルウェアによって展開された悪意のあるペイロードの詳細については、McMahon の元の投稿と Snyk の詳細な分析を参照してください。
著者について
Sergio De Simone
Sergio De Simone はソフトウェアエンジニアです。Sergio は過去 25 年以上にわたり、Siemens、HP、そして小規模スタートアップなど多様な企業やプロジェクトでソフトウェアエンジニアとして活動してきました。最近の 10 年以上は、モバイルプラットフォームおよび関連技術の開発に注力しています。現在、BigML, Inc. で iOS および macOS の開発を率いています。
詳細を表示する/表示しない
原文を表示
Discovered by FutureSearch researcher Callum McMahon, a supply chain attack against LiteLLM on PyPI resulted in over 40 thousand downloads of a compromised version that installed a malicious payload capable of harvesting and exfiltrating sensitive information. LiteLLM is downloaded roughly 3 million times per day.
As Andrej Karpathy noted on X, the malware was capable of exfiltrating SSL and SSH keys, Cloud provider credentials, Kubernetes configurations, Git credentials, API keys, shell history, crypto wallets, and many other kinds of secrets.
As McMahon explains, the attack affected the litellm 1.82.8 package:
It started with my machine stuttering hard, something that really shouldn't be happening on a 48GB Mac. htop taking 10s of seconds to load, CPU pegged at 100%, all signs I'll be working on my local env for a while… After failing to software reset my Mac, I took a final picture for evidence and hard reset.
After promptly reporting the compromised package to the PyPI security team and the LiteLLM maintainers, the affected package was quarantined within approximately 40 minutes. However, the risk extended further, as any packages depending on litellm version 1.82.8 was also indirectly compromised.
According to McMahon, all it took for his system to be compromised was launching a local MCP server through Cursor. This triggered the download of the latest LiteLLM package, which happened to have been compromised just minutes earlier. However, a flaw in the implementation of the malware itself caused the LiteLLM process to recursively fork, eventually bringing McMahon’s system to a complete halt:
The .pth launcher spawns a child Python process via subprocess.Popen, but because .pth files trigger on every interpreter startup, the child re-triggers the same .pth — creating an exponential fork bomb that crashed the machine.
Without this mistake in the implementation, the malware would have gone unnoticed for much longer and caused much greater damage, noted Karpathy.
Point Wild, provider of AI-powered cybersecurity, has open-sourced a dependency scanner to help developers assess the impact on their dependencies. The tool, who-touched-my-packages (wtmp), combines behavioral analysis and AI-driven detection to flag zero-day supply-chain threats, going beyond the coverage offered by conventional vulnerability checkers.
FutureSearch released a litellm-checker tool to help package maintainers determine whether their projects were impacted by the supply chain attack.
The LiteLLM team reported that the supply chain attack was enabled by a vulnerability in Trivy, allowing attackers to gain unauthorized access to the LiteLLM publishing pipeline.
For additional details on the supply chain attack and the malicious payload deployed by the malware, see McMahon's original post and Snyk's detailed analysis.
About the Author
Sergio De Simone
Sergio De Simone is a software engineer. Sergio has been working as a software engineer for over twenty five years across a range of different projects and companies, including such different work environments as Siemens, HP, and small startups. For the last 10+ years, his focus has been on development for mobile platforms and related technologies. He is currently working for BigML, Inc., where he leads iOS and macOS development.
Show moreShow less
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み