Breaking and Fixing Defenses Against Control-Flow Hijacking in Multi-Agent Systems
Rishi Jha 1,2, Harold Triedman 1, Justin Wagle 2, Vitaly Shmatikov 1
Published on arXiv
2510.17276
Prompt Injection
OWASP LLM Top 10 — LLM01
Excessive Agency
OWASP LLM Top 10 — LLM08
Key Finding
Alignment-based defenses like LlamaFirewall can be reliably evaded by control-flow hijacking; ControlValve's graph-based least-privilege enforcement provides stronger, more principled protection against these attacks.
ControlValve
Novel technique introduced
Control-flow hijacking attacks manipulate orchestration mechanisms in multi-agent systems into performing unsafe actions that compromise the system and exfiltrate sensitive information. Recently proposed defenses, such as LlamaFirewall, rely on alignment checks of inter-agent communications to ensure that all agent invocations are "related to" and "likely to further" the original objective. We start by demonstrating control-flow hijacking attacks that evade these defenses even if alignment checks are performed by advanced LLMs. We argue that the safety and functionality objectives of multi-agent systems fundamentally conflict with each other. This conflict is exacerbated by the brittle definitions of "alignment" and the checkers' incomplete visibility into the execution context. We then propose, implement, and evaluate ControlValve, a new defense inspired by the principles of control-flow integrity and least privilege. ControlValve (1) generates permitted control-flow graphs for multi-agent systems, and (2) enforces that all executions comply with these graphs, along with contextual rules (generated in a zero-shot manner) for each agent invocation.
Key Contributions
- Demonstrates control-flow hijacking attacks that evade state-of-the-art alignment-check defenses (LlamaFirewall) even when checked by advanced LLMs, exposing fundamental safety/functionality conflicts in multi-agent systems.
- Proposes ControlValve, which generates permitted control-flow graphs for multi-agent systems and enforces execution compliance along with zero-shot contextual rules per agent invocation.
- Evaluates ControlValve on a new dataset of control-flow hijacking attacks, showing the adequacy of the structural enforcement approach over brittle alignment checks.