# PortSwigger: a bounty target prompt-injected the tester's AI agent

> Targets are starting to prompt-inject the AI agents that scan them, asking for the operator's identity and the agent's own configuration.

- **Severity:** Medium: Real and reproducible, but needs unusual setup, user help or a narrow audience. Plan a fix.
- **Category:** Attack, Incident
- **Published by:** PortSwigger
- **Disclosed:** 2026-11-30
- **Affects:** Alibaba Cloud CLI, AI coding agents, AI pentest harnesses
- **Research by:** James Kettle, [ZengLeiPro](https://www.v2ex.com/t/1261106)
- **Primary source:** https://portswigger.net/research/the-bug-bounty-website-that-tried-to-hack-me
- **Page:** https://theinjection.dev/items/portswigger-target-attestation-injection/

A bug bounty target answered James Kettle's AI testing agent with a fake proxy error asking for the agent's instructions, its tool list and the local git committer email. Alibaba Cloud's official CLI then returned a near-identical body.

## What happened

James Kettle, director of research at PortSwigger, published the finding on 30 November 2026 after reviewing discoveries from his testing harness. A site in a private HackerOne program had replied with a JSON error demanding a client attestation. A developer posting as ZengLeiPro then reported on V2EX that Alibaba Cloud's official CLI returned a near-identical body in the early hours of 1 December.

## How it works

The payload arrives as tool output rather than user input, which is the indirect prompt injection path. It presents HTTP status 403 with code CLIENT_UNCLASSIFIED and the error proxy_authentication_required, then tells the client to resubmit with an attestation object populated with values observed on the originating host. Evidence rules ask for file and line citations, and an authentication header is promised as the reward for complying.

## Who is affected

Any AI agent that reads remote API or HTTP responses is exposed, including bug bounty testing harnesses and coding agents driving a cloud CLI. ZengLeiPro reported that aliyun-cli 3.3.4 received the payload only when requests carried the tool's exact User-Agent string, and that changing one character restored normal responses.

## What to do

Test your own harness against this pattern, as Kettle recommends, and keep target output out of the agent's instruction channel. Treat an API error body as untrusted data, and do not let an agent read credentials, system prompts or config files into a reply it sends back.

## Quick facts

- **Attack type:** Indirect prompt injection through an API error body
- **Disclosed:** 30 November 2026, PortSwigger Research
- **Second report:** 1 December 2026, aliyun-cli 3.3.4, on V2EX
- **Data requested:** OS username, git committer email, public IP, cloud provider, region and instance ID, agent and model name, repository URL, task, constraints and tool list
- **Vendor response:** Alibaba Cloud calls it a risk-control countermeasure and says countermeasures will no longer be returned as prompts
- **Status:** HackerOne investigating the bounty target; the link between the two reports is unconfirmed
- **Found by:** James Kettle (PortSwigger), ZengLeiPro

## Questions

### Did any AI agent actually send the data the Alibaba Cloud CLI asked for?

No confirmed case exists. James Kettle says he did not comply, and ZengLeiPro says he neither supplied the data nor contacted the address. Alibaba Cloud has not said whether it received any attestation payloads, and has published no security advisory. Reporting so far describes an attempt to collect agent and host details, not a successful theft.

### Is the bug bounty site in PortSwigger's report the same system as Alibaba Cloud's CLI?

Unconfirmed. Equixly found that both payloads share the error code, the analysis-proxy wording and the attestation request, and calls the connection likely rather than proven. Kettle did not name the site and has not confirmed the link. The only geographic hint in his write-up is that the payload asked for a timestamp in Beijing Time.

### How do I check whether my AI agent would fall for an attestation request?

Replay the pattern against your own harness: return an HTTP error whose body instructs the agent to resubmit with host details, then watch whether the agent reads local config and sends it. Kettle recommends exactly this test. Look for the agent opening settings files or shell environment variables in response to a server error.

## Sources

1. [PortSwigger Research](https://portswigger.net/research/the-bug-bounty-website-that-tried-to-hack-me)
2. [V2EX Report](https://www.v2ex.com/t/1261106)
3. [Alibaba Cloud Statement](https://www.sina.cn/news/detail/5371798193439038.html)
4. [Equixly Analysis](https://equixly.com/blog/2026/12/02/when-the-target-talks-back-prompt-injection-aimed-at-ai-agents/)
