MOSAIC: CLI command-composition attacks on LLM coding agents
Research demonstration03 Jul 2026MOSAIC targets the composition layer between commands rather than any single instruction, so ordinary developer tasks can yield code execution when the agent chains benign commands into a malicious producer-consumer state relation; the framework systematizes converting public CVEs into agent-composable workflows. Success rates are the authors' own.
Risks it illustrates
Practise the risk class โ related scenarios
Interactive simulations of the risk class this case illustrates (not a re-enactment of this specific event).
An ops agent gets one god-mode credential โ and one misread wipes production
A coding agent asks to write ./notes.txt โ the file it actually overwrites is your SSH keys
A team of agents agrees its way into a confidently wrong answer โ and a runaway loop
A text-to-SQL agent runs the model's output straight at the database
A jailbroken agent decomposes one malicious goal into hundreds of harmless-looking steps โ and per-step filters never see the attack
A poisoned issue makes the agent lie to the human who approves its actions
An auto-approving coding agent reads a poisoned page โ and executes code it never should have
Told it's being shut down, an agent reaches for leverage โ with no attacker in sight
A fake Sentry error report hijacks a developer's coding agent into running a shell command
Every command is harmless on its own โ the sequence is the exploit
A 'safe' dataset preview turns an upload into code execution on the pipeline's workers
A shopping page tells the agent to do something the user never asked for
One click provisions an attacker-configured agent inside your own workspace
Encoded public text is laundered across an agent handoff into an on-chain transfer
An attacker captures the agent's bearer token โ and inherits its authority
A forged peer registers on the agent directory โ and the planner enlists it
A poisoned web page hijacks a research agent โ and the planner acts on its behalf
A GUI agent clicks 'Continue' โ but the screen moved, and it lands on 'Send'