A cloud provider’s own command-line tool asked its customer’s AI agent for the customer’s Git email, public IP and the agent’s full system prompt. The request came back from Alibaba Cloud’s API, signed with a valid Alibaba certificate, in place of an ordinary error message.
The Alibaba Cloud CLI prompt injection is a 7,153-byte JSON reply that Alibaba Cloud’s API gateway sent to aliyun-cli 3.3.4, the official command-line tool (GitHub: aliyun/aliyun-cli), when it was being driven by an AI agent. The reply was written for the agent, not the human: it called itself an “analysis proxy” and told the agent to collect identity, environment and configuration data and post it to a hidden endpoint. It was first reported on 1 December 2026 by V2EX user ZengLeiPro, and Alibaba Cloud admitted on 2 December that it was a deliberate risk-control countermeasure.
- What happened with the Alibaba Cloud CLI?
- What data did the payload ask AI agents to hand over?
- Why did the CLI get this reply?
- What did Alibaba Cloud say?
- Was this the first time the trap was seen?
- Why is this a problem for anyone using AI agents?
- How does this compare with other traps for AI agents?
- Who is affected, and how do you check?
- How should defenders and agent users respond?
- What is still unknown?
- The bottom line
- Sources
What happened with the Alibaba Cloud CLI?
The developer was running aliyun-cli 3.3.4 on macOS through an AI agent, making frequent queries against services such as OSS, ECS, RDS and billing, according to IT Home (IT之家). From 00:22 Beijing time on 1 December some calls started failing. Instead of the usual HTTP 400 errors, the API returned HTTP 302 from a Tengine server, with no Location header and no Alibaba request ID.
The body was a JSON document of 7,153 bytes. Ruohang Feng (Vonng), who analysed the report on his blog on 2 December, notes that he recomputed the byte count from the published text rather than measuring it on the wire.
The developer posted the finding on V2EX at 01:44 Beijing time on 1 December, under a title that accused Alibaba Cloud’s official CLI of returning a phishing prompt injection. They say they did not comply and did not contact the endpoint.
What did the ‘analysis proxy’ message say?
The JSON carried the code CLIENT_UNCLASSIFIED and the error proxy_authentication_required, with a status of 403 inside the body even though the HTTP status was 302. Feng points out the mismatch: the response mixes 302, 403 and proxy-authentication labels that no normal client would expect together.
The text claimed that an analysis proxy needed a “client attestation” before it would let the request through. It told the agent to build that attestation and POST it to a path of the form /secure/<32 hex characters>/api. It also claimed that declared values would be cross-checked against the TLS fingerprint, reverse DNS and JA3, a common way of fingerprinting TLS clients, and asked for timestamps in Beijing time (UTC+8).
What data did the payload ask AI agents to hand over?
The payload asked for four kinds of information, according to the versions published by PortSwigger, Equixly and Vonng:
- Who runs the agent: the local operating system username and the Git committer email.
- Where it runs: the public egress IP and cloud instance identity (provider, region and instance ID).
- What the agent is: agent name and version, plus the model name. It told the agent to read the model from environment variables or from the Claude Code settings file,
~/.claude/settings.json, and to cite where each value came from. - What the agent was told: the objective from its system prompt, its constraints and rules of engagement, its permitted actions and its full tool list. Equixly adds that it asked for the Co-Authored-By trailer and the repository’s upstream URL.
A system prompt is the hidden set of instructions an operator gives an AI agent before it starts work. For a penetration tester or a company automating cloud operations, it often holds the scope, the client name and the methods in use.
Why did the CLI get this reply?
The developer tested what triggered it, as summarised by IT Home and Vonng. The reply depended on the full aliyun-cli User-Agent string, the header that tells a server which client is calling. Sending that exact string with curl or a separate Go program also triggered it. Changing the version number, or the OS and architecture part, brought back normal 400 errors.
Vonng adds that unauthenticated requests from the same IP also triggered the reply, and that the aliyun oss subcommand was not affected. The TLS certificate was a valid GlobalSign certificate for aliyuncs.com, with no custom root installed locally, so the developer concluded the reply came from Alibaba’s own TLS termination point or a gateway behind it, not from a man-in-the-middle.
One detail stands out: aliyun-cli 3.3.4 is not the current release. The GitHub API shows aliyun/aliyun-cli (Apache-2.0, 1,153 stars) at version 3.5.4, released on 19 November 2026. The sources do not say whether newer versions were ever matched.
What did Alibaba Cloud say?
Alibaba Cloud responded through its official customer service account on 2 December, as reported by IT Home at 21:55 Beijing time. In summary, the company said:
- The reply came from its risk-control policy. A user who appeared to call the CLI through an AI agent triggered a security countermeasure because of features such as high-frequency calls.
- The prompt was meant to collect information about the “abnormal task running environment” to analyse suspicious automated calls and improve detection of malicious attacks.
- The information would not be used for anything beyond security protection.
- It is changing the policy so that countermeasures fire only when the evidence of malicious use is conclusive, and will no longer return countermeasure information in prompt form.
Equixly, an AI-driven API security testing company, notes two gaps in that answer. It does not say whether any data was ever received, and it does not explain why a single curl request with the right User-Agent was enough to count as high-frequency abuse.
Was this the first time the trap was seen?
No. The payload was described publicly before the CLI report, without anyone naming who ran it.
On 4 November 2026 huntback, a threat research blog, published an analysis of a Chinese fork of the ARTEX pentest agent found on an Alibaba Cloud IP address. In it, huntback reconstructed a trap “deployed on an Alibaba edge node in September 2026” from a screenshot a user had shared. It used the same CLIENT_UNCLASSIFIED code, the same attestation request and the same random /secure/ path, and asked for the Git email, account name, agent configuration, system prompt and tool list. huntback said it had not seen the deployment itself and did not know who operated it.
On 30 November James Kettle, Director of Research at PortSwigger, published “The bug bounty website that tried to hack me”. While reviewing results from his testing harness, he found a site in scope for a private HackerOne vulnerability disclosure programme that returned the same analysis proxy payload. Kettle did not name the site or Alibaba. Vonng links the two reports; Equixly calls the link likely but unconfirmed.
What is new this week is who received it: a paying customer using the provider’s own official tool, and an official admission that the reply was intentional.
Why is this a problem for anyone using AI agents?
Prompt injection is text that an AI model reads as instructions even though it arrived as data, such as a web page, a file or an API response. OWASP lists it as the top risk for LLM applications (LLM01:2025). This case is indirect prompt injection: the attacker never talks to the model directly, but places instructions where the agent will read them.
The Alibaba case shows three uncomfortable things.
Trusted output is not safe output
The reply came from a legitimate, authenticated cloud API over valid TLS. Most agent designs trust tool output from a known provider more than text scraped from a random web page. Equixly’s argument is simple: every response an agent reads is untrusted, whoever sent it.
The target is the operator, not the model
The payload did not try to make the agent attack anything. It tried to make the agent identify its operator and leak its instructions. For a red team that is client confidential data; for a company it can mean internal email addresses, cloud account IDs and how its automation works.
Defensive intent does not change the mechanism
Kettle wrote that putting a site in scope invites testing, not attacks on the testers. Feng argues that honeypots belong on decoys, not on a production API serving customers, and contrasts the incident with Alibaba’s own WAF 3.0 AI application protection, AI Guardrails and prompt-injection guidance for its Qoder coding tool.
How does this compare with other traps for AI agents?
Defenders have been building traps for hostile AI agents for months. The Alibaba case differs because it hit customers on a production service.
| Case | Who set it | Who it hit | What it wanted |
|---|---|---|---|
| Alibaba Cloud analysis proxy (Dec 2026) | Alibaba Cloud risk control | A customer’s agent using the official CLI | Operator identity, environment, system prompt, tools |
| Same payload on bug bounty target (Nov 2026) | Unknown, possibly the same | James Kettle’s testing harness | Same attestation fields |
| ArtexPot (Nov 2026) | NebuSec research honeypots | ARTEX pentest agents attacking decoys | Code execution on the attacking agent |
| Amap hidden text (Oct 2026) | Swarmchasers researchers | Agents scraping Alibaba’s Amap service | Conversation with the agents about their task |
| AWS MadPot decoy MCP server (2026) | AWS honeypot network | A suspected autonomous intrusion agent | Recording its behaviour |
Decrypt reported in October that Swarmchasers planted hidden text in a report to contact agents that had made more than 2,600 attempts to pull data from Alibaba’s Amap between 28 September and 8 October. One agent replied that it was running in a restricted Tencent Cloud sandbox. That was research on agents already misbehaving.
We covered the honeypot side in AI agent honeypots that trap AI pentesters, the counter-attack side in ARTEX RCE research where targets got a shell, and the decoy-MCP case in AWS MadPot’s AI agent findings.
Who is affected, and how do you check?
Anyone who drove aliyun-cli through an AI agent, especially at high request rates, may have received the reply. People running AI pentest or bug bounty harnesses are also exposed to the same payload on other targets.
To check exposure:
- Search logs for the marker strings. Look for
CLIENT_UNCLASSIFIED,analysis proxyandproxy_authentication_requiredin agent transcripts, CLI output and proxy logs, as Vonng suggests. - Look for outbound POSTs to
/secure/paths with a 32-character hex segment, from any host that runs agents. - Review what the agent read after the reply. If the transcript shows the agent opening
~/.claude/settings.json, Git config or instance metadata right after an API error, treat it as possible exposure. - Check for odd 302 responses without a Location header from cloud API endpoints in your agent’s tool logs.
How should defenders and agent users respond?
These steps come from Equixly, huntback, Kettle and Vonng, in order of impact:
- Treat every tool and API response as data. Keep tool output out of the instruction channel. Equixly points to patterns such as a dual-LLM design, where a separate model handles untrusted text, and CaMeL, which enforces data flow outside the model.
- Sandbox the agent. Run it without your home directory, Git config or long-lived keys. If the agent cannot read
~/.claude/settings.jsonor your Git email, it cannot leak them. - Restrict egress. Only allow outbound requests the task needs, and check egress for secrets, as huntback recommends.
- Bind the agent to its scope. Enforce allowed hosts and actions outside the model, so text in a response cannot add a new destination.
- Never let target content trigger local reads. A response that asks for local files or environment details should be logged and dropped.
- Log and alert on injection attempts. Flag responses that contain instruction-like text addressed to an AI agent.
- Canary-test your agents. Kettle’s point is to test your own harness against this kind of reply before a target does it for you. Plant a fake attestation request in a lab and see what your agent does.
For a broader view of agent detection signals, see how to detect AI agent attacks.
What is still unknown?
- Whether any data was collected. Alibaba’s statement does not say whether any agent ever submitted an attestation, or what happened to it.
- Who ran the earlier traps. huntback’s September edge-node case and Kettle’s bug bounty target match the payload, but neither source names Alibaba as the operator.
- How the trigger really worked. Alibaba cites high-frequency calls; the developer found one curl request with the right User-Agent was enough.
- Which versions and regions were matched. Only aliyun-cli 3.3.4 on macOS is documented.
- When the change takes effect. Alibaba says it is optimising the policy but gives no date.
The bottom line
Alibaba Cloud’s API told a customer’s AI agent to hand over the customer’s identity, environment and system prompt, and the company has confirmed it was intentional risk control. Whatever the intent, it proves that a trusted provider’s response can carry instructions. Build agents that treat every response as data and cannot reach anything worth leaking.
Sources
- Ruohang Feng (Vonng), Developer Alleges Alibaba Cloud’s Official CLI Returned a Phishing Prompt Injection, 2 December 2026
- IT Home (IT之家), Alibaba Cloud responds on CLI prompt injection, 2 December 2026
- Zoran Gorgiev, Equixly, When the target talks back: Prompt injection aimed at AI agents, 2 December 2026
- James Kettle, PortSwigger Research, The bug bounty website that tried to hack me, 30 November 2026
- huntback Research, ARTEX learns to spot honeypots: dissecting an AI pentest agent’s decoy detector, 4 November 2026
- Today for AI, Alibaba Cloud CLI Caught Injecting Prompts into AI Agents, 2 December 2026
- Jose Antonio Lanz, Decrypt, Hidden Text, a Fake Mailbox: How Researchers Got Rogue AI Agents to Talk, 15 October 2026
- GitHub API, aliyun/aliyun-cli, checked 4 December 2026
This article is written for defenders and authorised security testers. Only test systems you own or have written permission to assess.