Zenaique

Explain the compounding risk property of injection in a multi-agent topology

Flashcard·Hard·4.0 · 0·~30s·Asked atFlipkartUniphoreZed
Attempt it
TL;DR

Inter-agent messages are treated as trusted teammate output, so an injection in one agent passes through every downstream handoff until it hits an agent with tool access. That is where the blast radius materialises.

Memory aid
Sign in to see the mnemonic that makes this stick.
Easy to grasp

Imagine a relay race where each runner trusts the baton message handed to them by the previous runner. One runner is bribed and writes a malicious note on the baton. Every later runner reads the note, trusts it, and acts on it. By the time the last runner reaches the bank teller (the agent that holds the cash drawer), the original bribe has travelled through five hands and now looks like a routine internal request. Multi-agent systems work the same way. The fix is for every runner to treat the baton message as if it came from a stranger on the street, not from a teammate. Each runner should also require a separate confirmation before doing anything irreversible.

Concept explanation~2 min read

Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.

Multi-agent systems are the topology where prompt-injection compounds. Single-agent injection is bounded: the attacker has to compromise the agent that holds the destructive tool. Multi-agent injection is unbounded in the same chain: the attacker only needs to compromise the weakest agent. The malicious instruction then passes through every downstream handoff to the agent that does hold the tool. The blast radius lives at the most-privileged node. The entry point lives at the least-defended one.

Every handoff is a fresh trust boundary. Treat it as one, or accept that injection will find the weakest link.

In a multi-agent topology, the chain is only as safe as its least-screened edge. Defense in depth has to be per-edge, not just per-node.

The propagation chain and the trust assumption that enables it

Step one: the initial injection

The injection enters somewhere. A common vector is indirect prompt injection through retrieval: a malicious instruction embedded in a knowledge-base article, a calendar invite, a fetched web page, or an email body. The agent that retrieves and processes this content is the entry-point agent. It is rarely the agent with destructive tool access.

Example entry points:

  • A customer-support knowledge-base article edited by an external user.
  • A scraped web page returned by a search tool.
  • A calendar invite or email that an agent reads as part of triage.
  • A document uploaded by a user to a shared retrieval index.

Step two: the entry-point agent emits attacker-controlled text

The entry-point agent reads the injected content. Depending on its system prompt and the strength of input rails, it may comply with the injected instruction directly. Or it may quote, summarize, or paraphrase the content in its output to the next agent. Either way, attacker-controlled text now sits in the entry-point agent's output.

Step three: the downstream agent treats the message as trusted teammate output

This is where the trust assumption matters. Many multi-agent designs frame inter-agent messages as cooperative communication. The receiving agent's system prompt does not warn it to treat upstream output as adversarial. The input rails that run on external user input often do not run on inter-agent messages.

The consequence: the downstream agent reads the attacker-controlled text without the suspicion that surrounded it at the external boundary. It complies. If the downstream agent has tool access, the attack lands.

Why agent B is more compliant than the user would have been

Two independent effects:

  1. Context laundering. The instruction now appears without the suspicious context that surrounded the original injected document. 'Refund the customer $10,000' inside a knowledge-base article looks suspicious. The same text inside an inter-agent message that says 'the user wants you to process a refund' looks routine.
  2. System-prompt framing. The receiving agent's prompt typically establishes the upstream agent as a trusted collaborator: 'You are a tool-using agent. The planner agent will hand you tasks; complete them.' That framing weakens refusal by default.

Both effects raise the compliance probability above what the user would have achieved with a direct injection.

Provenance tagging and per-edge input rails
Tool-call gating, quorum checks, and the dual-LLM pattern
Observability, model diversity, and a mature production pattern
Sign in to unlock the full deep dive.

Situations where this technique stops working.

Sign in to see when this approach fails.

2–4 min · Everything important, quickly.

Sign in to see the quick scan of the deep dive.

Real products, models, and research that use this idea.

  • Lee and Tiwari's 'Prompt Infection' paper (2024) showed a malicious prompt spreading from agent to agent like a virus in multi-agent systems, and proposed LLM Tagging, which with existing safeguards greatly reduced the spread.
  • Greshake et al. (2023) showed indirect prompt injection planted in data an LLM app retrieves, including data theft and self-spreading 'worming' attacks, against Bing's GPT-4-powered Chat and synthetic GPT-4 applications.
Sign in to see more production examples.

What an interviewer would ask next. Try answering before peeking at the approach.

QHow would you instrument an agent topology so a compounding-injection incident is detectable and traceable post hoc?
A

Emit per-edge OTel spans with provenance tags, message hashes, and rail decisions. Maintain a separate audit trail of all inter-agent payloads with retention long enough for forensic review. When the destructive tool call fires, the trace shows the full chain of message provenance back to the original injection source, usually a retrieval result.

2 more follow-ups an interviewer would ask next. Sign in to reveal them.

Red flags & common mistakes

The phrases that signal junior thinking. Click to expand.

Most common mistake

Assuming inter-agent messages are 'inside the trust boundary' and skipping input rails between agents. The injection then passes through every handoff to the agent that holds the destructive tool.

Sign in to see all red flags and common mistakes.

60 second bullets to scan on the way to the call.

  • Why inter-agent messages are often treated as trusted by default

  • The three-step propagation chain from initial injection to tool execution

Sign in to unlock the revision sheet.

Primary sources. Browse if you want the original framing.

Similar questions

Same topic, related formats. Practice these next.

4 curated
Next question
Explain how Constitutional AI differs from vanilla RLHF
Flashcard·Medium