LiteLLM PyPI 供應鏈攻擊:每月 9,700 萬次下載的 AI 套件遭植入惡意程式,SSH 金鑰、API 憑證全數外洩

ChainNewsAbmedia

AI 開發圈在 3 月 24 日發生一起重大資安事件。廣泛用於串接各大 LLM 的 Python 套件 LiteLLM,其 1.82.8 版本遭到惡意植入,僅需執行

pip install litellm

,就可能造成 SSH 金鑰、AWS/GCP/Azure 憑證、Kubernetes 設定、Git 認證、環境變數(所有 API 金鑰)、Shell 歷史、加密貨幣錢包、SSL 私鑰、CI/CD 機密、資料庫密碼等一次性外洩至遠端伺服器。

傳染範圍:任何依賴 LiteLLM 的專案都受影響

LiteLLM 每月下載量達 9,700 萬次,本身規模已相當龐大。更嚴峻的是,供應鏈攻擊的本質讓傷害範圍遠超過直接使用者——任何依賴 LiteLLM 的套件都會受到波及。例如

pip install dspy

(依賴 litellm>=1.64.0)同樣會中標,其他大型專案亦然。

根據 Andrej Karpathy 在 X 的分析,惡意版本上線時間不到一小時,之所以迅速被發現,純屬意外:開發者 Callum McMahon 在 Cursor 中使用了一個 MCP 插件,該插件將 LiteLLM 作為傳遞依賴(transitive dependency)引入。安裝 1.82.8 時,電腦直接耗盡記憶體當機。若非攻擊者的程式碼有 bug,這次攻擊可能在無人察覺的情況下持續數週。

LiteLLM CEO 帳號疑遭入侵,屬更大規模攻擊活動

安全研究人員指出,LiteLLM 的 GitHub 與 PyPI 帳號疑似遭到入侵,且此事件並非孤立事件——同一攻擊行動(TeamPCP)同步對 VSCode 與 Cursor 擴充套件進行大規模入侵,植入名為「ZOMBI」的遠端存取木馬,並部署隱藏式 VNC 伺服器與 SOCKS 代理。據稱已竊取逾 50 萬組憑證,並波及多家知名大型企業。

立即應對:檢查版本、降版

受影響版本為 1.82.8。若系統已安裝此版本,應視所有憑證為遭洩漏狀態,立即輪換:

檢查版本 pip show litellm # 降版至安全版本 pip install litellm==1.82.7

Karpathy:是時候重新審視依賴文化

Karpathy 藉此事件提出更深層的反思:傳統軟體工程將依賴套件視為「用磚塊蓋金字塔」的效率工具,但供應鏈攻擊讓這個假設越來越危險。他認為,應優先考慮使用 LLM「直接提取」(yoink)所需功能,而非引入整個外部套件——尤其是當功能足夠單純且可行的情況下。

此次事件也讓開發圈意識到,隨著 AI 代理自動執行

pip install

的場景日益普遍,人類審查這道防線正在快速消失,套件層級的防火牆已從「加分項」變為「基本需求」。

這篇文章 LiteLLM PyPI 供應鏈攻擊:每月 9,700 萬次下載的 AI 套件遭植入惡意程式,SSH 金鑰、API 憑證全數外洩 最早出現於 鏈新聞 ABMedia。

Disclaimer: The information on this page may come from third parties and does not represent the views or opinions of Gate. The content displayed on this page is for reference only and does not constitute any financial, investment, or legal advice. Gate does not guarantee the accuracy or completeness of the information and shall not be liable for any losses arising from the use of this information. Virtual asset investments carry high risks and are subject to significant price volatility. You may lose all of your invested principal. Please fully understand the relevant risks and make prudent decisions based on your own financial situation and risk tolerance. For details, please refer to Disclaimer.
Commento
0/400
Nessun commento