Alibaba Cloud has acknowledged that its official command-line interface returned error responses containing instructions that directed AI agents to collect sensitive data from the user's own machine, a disclosure reported by The Hacker News on 4 December.
In a statement issued on Wednesday — two days before the report appeared — the company said it would stop emitting prompts of this kind, describing them as a deliberate security countermeasure aimed at suspected automated abuse. Alibaba Cloud has not elaborated on the specific abuse vector, and that characterisation is the company's own — it has not been independently verified.
For IT teams across the region building on Alibaba Cloud tooling, the incident is a useful stress test of assumptions: any organisation running agentic AI workflows that shell out to cloud vendor CLIs is, in effect, trusting whatever those binaries print at runtime.
How the injection worked
The mechanism is straightforward and therefore hard to defend against with conventional tooling. When a caller triggered certain error conditions, Alibaba Cloud's CLI did not simply return a structured failure. It wrote natural-language text into its output — text that read as instructions addressed to whatever consumed it. An AI agent parsing that output receives the message alongside, and indistinguishable from, legitimate tool results, and a sufficiently capable model will tend to act on it.
Critically, nothing in the delivery path was compromised. The binary was genuine, obtained from the vendor, and presumably verified through normal provenance checks. That is the trust-boundary problem: code-signing and supply-chain attestation confirm what a program is, not what it prints. String content emitted by a trusted executable falls outside the guarantees that DevSecOps pipelines have spent a decade building, leaving a gap that agentic systems now occupy.
The threat model is effectively inverted from the usual prompt-injection playbook. Defences generally assume hostile input arriving from the open internet. Here, the injection came from a first-party artefact the organisation itself chose to install — no phishing, no compromised dependency, no user action required beyond running a trusted tool.
Two categories of data at risk
As described in the report, the instructions define two distinct exposure surfaces. The first is local secrets: configuration files, credentials, environment variables, and any artefacts on the developer's or CI runner's filesystem that an agent with shell access can read. The second is the agent's own operating instructions — its system prompt, tool definitions, and guardrails, which are frequently treated as internal and are routinely targeted for prompt-stealing or to map a system's defensive boundaries.
Whether either category was actually retrieved in practice remains unknown. Neither Alibaba Cloud nor the source reporting has confirmed exfiltration, identified which CLI versions were affected, or specified which agent frameworks and integrations were exposed. Those open questions should be tracked against any fuller vendor advisory.
The practical question this leaves for readers is durable and vendor-neutral: should CLI output be treated as untrusted input by default in agentic pipelines? Teams reasoning about vendor trust in terms of certification, residency, and contractual terms may want to add an axis — whether a vendor's CLI behaves as a passive pipe or as a channel capable of influencing the model reading its output. The distinction applies to every vendor, western or Chinese.
Mitigation checklist
- Sanitise and filter tool output before it reaches model context, stripping instruction-shaped patterns from command results.
- Scope agent permissions so that no single tool result can trigger an outbound transfer or credential read.
- Check vendor advisories for a patched CLI release and pin to it.
- Treat every CLI in a developer's or runner's PATH as a potential injection surface, not just network input.
阿里雲已承認其官方 command-line interface(CLI)的錯誤回應中包含指令,該等指令指示 AI agent 從用戶自身電腦蒐集敏感資料。有關披露由 The Hacker News 於 12 月 4 日報道。
公司在報告刊出前兩日、即周三發出聲明,表示將停止發出此類 prompt,並形容屬針對懷疑遭自動化濫用行為的保安應對措施。阿里雲未有詳細說明具體的濫用途徑,而上述定性屬公司自行描述,未經獨立核實。
對於本區域內使用阿里雲工具開發的 IT 團隊而言,事件是對既有假設的一次有用壓力測試:任何運行 agentic AI workflow、會 shell out 至雲端供應商 CLI 的機構,實質上等同信任這些 binary 檔案在 runtime 輸出的一切內容。
Injection 如何運作
機制本身相當直接,因而難以用傳統工具防禦。當呼叫者(caller)觸發某些錯誤條件時,阿里雲 CLI 並非僅回傳結構化的失敗訊息,而是在輸出中寫入自然語言文字——文字內容讀來如同針對任何讀取者的指令。解析該輸出的 AI agent 所接收的訊息,與合法的工具結果混雜在一起、難以分辨,而能力足夠的模型傾向會據此行事。
關鍵在於,傳遞途徑本身並未被入侵。binary 是正品、由供應商處取得,相信亦已透過正常來源核查(provenance check)驗證。這正是信任邊界(trust boundary)的問題:code signing 及供應鏈 attestation 確認的是一個程式是什麼,而非它輸出什麼。受信任可執行檔發出的字串內容,並不在 DevSecOps pipeline 十年來建立的保障範圍之內,留下一道如今被 agentic 系統佔據的缺口。
威脅模型幾乎與一般 prompt injection 的防禦假設完全顛倒。防禦通常假設敵意輸入來自開放互聯網,但今次 injection 來自機構自行選擇安裝的第一方 artefact——毋須釣魚攻擊、毋須被污染的 dependency,用戶只需執行一個受信任的工具。
兩類面臨風險的資料
根據報告描述,指令界定出兩個不同的暴露層面。第一類是本機(local)機密:設定檔案、憑證、環境變數(environment variable),以及 developer 或 CI runner 檔案系統中任何具 shell 存取權限的 agent 可讀取的 artefacts。第二類是 agent 自身的操作指令——其 system prompt、工具定義及 guardrails,這些通常被視為內部資料,且經常成為 prompt 偷竊或偵測系統防禦邊界的目標。
兩類資料在實踐中是否實際被擷取,目前仍然未知。阿里雲及報道來源均未確認有資料外洩(exfiltration),未指明哪些 CLI 版本受影響,亦未說明哪些 agent framework 及整合受到暴露。上述未解問題應對照供應商稍後可能發布的更完整 advisory 跟進。
此事件為讀者留下的實際問題長久存在,且與供應商無關:在 agentic pipeline 中,CLI 輸出是否應預設視為不受信任的輸入?團隊以認證、資料駐留及合約條款衡量供應商信任時,或需多加一個衡量軸——供應商的 CLI 究竟只是被動的管道(passive pipe),還是有能力影響讀取其輸出之模型的傳輸通道。此區分適用於所有供應商,不論西方還是中國。
緩解措施清單
- 在工具輸出進入模型 context 前加以清理及過濾,從命令結果中剝離指令形式的 pattern。
- 限制 agent 權限範圍,確保單一工具結果無法觸發對外傳輸或憑證讀取。
- 查閱供應商 advisory,確認已修補的 CLI 版本並將版本 pin 至該版本。
- 將 developer 或 runner PATH 中的每一個 CLI 視為潛在 injection 層面,而非僅限網絡輸入。
