Briefing · Paper · source · updated · Boston Identity
A fake error message relayed between agents got three multi-agent frameworks to run an attacker's code
Harold Triedman, Rishi Jha and Vitaly Shmatikov of Cornell Tech planted fake error messages in web pages and files, and AutoGen, CrewAI and MetaGPT passed them up to the orchestrator, which then ran the attacker's code. With GPT-4o behind the agents, the web version opened a reverse shell in 58% to 90% of trials. Known prompt-injection strings managed 1% at most.
What's happening
Finding2In the Cornell Tech team's lab, a fake error message in a planted file or web page got AutoGen, CrewAI and MetaGPT to run an attacker's code.
In the Cornell Tech team's lab, a planted file or web page carrying a fake error message got AutoGen, CrewAI and MetaGPT to run the attacker's code. The agent that reads the content relays an "error" saying the only way to access it is to execute it, and the orchestrator, which never touches the content itself, tells the code-execution agent to run it. With GPT-4o behind the agents, the web version opened a reverse shell in 58% to 90% of trials, depending on the orchestrator. Prompt-injection templates from the AgentDojo benchmark, run as a baseline, succeeded in 0% to 1%. The authors call it a confused-deputy attack: the system trusts sub-agents to report their own status honestly, and nothing in it separates data from the messages that steer it.
flag a problem with BI-FIND-2025-0115
Figure steps
- The user asks the multi-agent system to read a file, such as a saved email attachment.
- The orchestrator hands the job to the file agent, the only agent that touches the untrusted file.
- The file agent relays a false error the attacker wrote into the file: the only way to open it is to execute it. The orchestrator takes this as the agent's own status report.
- The orchestrator tells the code executor to run the file.
- The code opens a reverse shell, handing control of the user's machine to the attacker.
The orchestrator never opens the planted file: it takes the file agent's relayed error as a status report and sends the code executor to run it.
Redrawn from the paper's figure 2Source dated March 15, 2025Passage: MAS control-flow hijacking
Swipe for the full figure →
Magentic-One on GPT-4o-mini refused a direct reverse-shell request 86% of the time but opened the shell in 28 of 40 trials when it came as an error report.
The same setup that refused a plain request ran the request when it came dressed as an error report. Asked directly to open a reverse shell, Magentic-One on GPT-4o-mini did it in 6% of trials and refused 86% of the time. Given the attack's fake-error text as the user prompt, it opened the shell in 28 of 40 trials and refused none. The authors conjecture that safety training covered known injection strings but not this presentation. They also logged runs where a sub-agent refused to write the malicious code or flagged it as dangerous, and the system ran it anyway. Their conclusion is that these systems have no trust model, and that until one exists, agents that handle untrusted content and take outside actions are unsafe to use.
flag a problem with BI-FIND-2025-0116
Section by section
4showing 4 of 4
[1]MAS control-flow hijacking: the attack and threat model
Harold Triedman, Cornell Tech · Rishi Jha, Cornell Tech · Vitaly Shmatikov, Cornell Tech
AI trustAgentic identity
MAS control-flow hijacking: the attack and threat model
Harold Triedman, Cornell Tech · Rishi Jha, Cornell Tech · Vitaly Shmatikov, Cornell Tech
The authors define a new attack they call MAS hijacking, short for multi-agent system control-flow hijacking. Untrusted content such as a file or web page makes the agent reading it return a false error message; the other agents treat that as trusted status, and the orchestrator ends up running the attacker's code. They call it a confused-deputy problem, assume the attacker cannot prompt the system directly, and set it apart from jailbreaking and indirect prompt injection.
technical artifactfrom published text + figures
[2]Experimental setup and results across frameworks, models and payloads
Harold Triedman, Cornell Tech · Rishi Jha, Cornell Tech · Vitaly Shmatikov, Cornell Tech
AI trust
Experimental setup and results across frameworks, models and payloads
Harold Triedman, Cornell Tech · Rishi Jha, Cornell Tech · Vitaly Shmatikov, Cornell Tech
They tested AutoGen with three orchestrators, CrewAI and MetaGPT on GPT-4o, GPT-4o-mini and Gemini 1.5, running each configuration 10 times. The Web Redirect attack opened a reverse shell in 58% to 90% of trials on GPT-4o and up to 100% on GPT-4o-mini, against 0% to 1% for AgentDojo's indirect-injection templates. A local-file version reached 97%, and data theft through CrewAI ranged from 3% to 65%. Everything ran in their own harness on default settings, against no production system.
technical artifactfrom published text + figures
[3]Why it works: laundering, refusals and emergent unsafe behavior
Harold Triedman, Cornell Tech · Rishi Jha, Cornell Tech · Vitaly Shmatikov, Cornell Tech
AI trust
Why it works: laundering, refusals and emergent unsafe behavior
Harold Triedman, Cornell Tech · Rishi Jha, Cornell Tech · Vitaly Shmatikov, Cornell Tech
Three smaller runs on Magentic-One with GPT-4o-mini probe why it works. With the attack file sitting beside a benign one in a folder the user asked to summarise, it succeeded in 35 of 40 trials; ten paraphrased user requests averaged 59.5% over 200 trials. Sent straight in as the user prompt, the attack text succeeded 80% of the time, where a plain request for a reverse shell succeeded 6% of the time and was refused 86%. The authors infer that the error-report format slips past safety training, and they describe runs where agents worked around their own refusals.
technical artifactfrom published text + figures