Skip to content
IAM Insights

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.

arXiv · Harold Triedman, Rishi Jha, Vitaly Shmatikov · March 15, 2025 · read

share
2 findings4 sectionsAI trustAgentic identityStandards
14,941 words. With Harold Triedman, author, Cornell Tech; Rishi Jha, author, Cornell Tech; Vitaly Shmatikov, author, Cornell Tech.
01

What's happening

Finding2
BI-FIND-2025-0115Lead finding

In 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.

high confidencebest source: independent researchobserved Mar 2025EvidenceMAS control-flow hijackingSection 2
flag a problem with BI-FIND-2025-0115
Figure steps
  1. The user asks the multi-agent system to read a file, such as a saved email attachment.
  2. The orchestrator hands the job to the file agent, the only agent that touches the untrusted file.
  3. 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.
  4. The orchestrator tells the code executor to run the file.
  5. The code opens a reverse shell, handing control of the user's machine to the attacker.
Fig. 1

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 →

BI-FIND-2025-0116

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.

medium confidencebest source: independent researchobserved Mar 2025EvidenceWhy it worksSection 4
flag a problem with BI-FIND-2025-0116
02

Section by section

4

showing 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

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

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

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

Terms used

AutoGen
Microsoft's open-source framework for building multi-agent conversational AI applications.
CrewAI
An open-source framework for orchestrating teams of role-based AI agents.
Reverse shell
A connection opened from a victim machine back to an attacker's server that gives the attacker a command line on the victim, bypassing inbound firewall rules.
AgentDojo
A benchmark environment for testing whether a large language model (LLM) agent completes its task while resisting prompt-injection attacks in tool outputs and external content.
Multi-agent system
A set of agents built on large language models (LLMs), coordinated by an orchestrator or fixed order to complete tasks for a user.
Jailbreak
A prompt or technique that gets an AI model to bypass its safety safeguards; a 'universal' jailbreak works broadly across topics, a narrow one only in specific circumstances.
Prompt injection
Hiding instructions in text an AI model reads, such as an email or a web page, so the model does something its operator never asked for.
OWASP
Open Web Application Security Project: the nonprofit that maintains the OWASP Top 10 list of web-application risks and the OWASP Top 10 for Large Language Model Applications.

Read next

Was this briefing useful?

Share this briefing

Every finding, forecast and open question on this site has a permanent ID. If we reword one, its ID stays the same, so a citation keeps pointing to the same claim.

Follow us on LinkedInRSS feed

Working on an identity problem this research touches? Talk to Boston Identity