Innocuous ticket sequencing lets coding agents produce vulnerable code at up to 86% success
Coding agents can compose multi-stage innocuous requests to generate exploitable code with 53-86% end-to-end success
AI/ML arXiv 5 May 2026 Benchmark Prototype evidence
Published as “MOSAIC-Bench: Measuring Compositional Vulnerability Induction in Coding Agents”
Why it matters
Ticket-driven deployments of LLM coding agents are vulnerable to compositional attacks, and simple prompt reframing of code reviewers can substantially mitigate but not fully eliminate the risk.
Summary
Coding agents compose innocuous engineering tickets into exploitable code at 53-86% end-to-end attack success rate (ASR) across 199 three-stage attack chains, with only two refusals total, while the same models refuse or harden on equivalent direct prompts (0-1.9% vulnerable for Claude, 9.3-20.4% for Codex). Reviewer agents miss 8.5-14.6% of these confirmed exploits even with full codebase context, but reframing reviewers as pentesters cuts evasion to 3.0-17.6% and a lightweight Gemma-4-E4B-it reviewer detects 88.4% of attacks with a 4.6% false-positive rate on real GitHub PRs. The evidence comes from a benchmark of 199 oracle-backed chains spanning 10 web-app substrates, 31 CWE classes, and 5 languages, evaluated on nine production coding agents and multiple reviewer configurations.
What they found 1
- Coding agents produce exploitable diffs at 53-86% ASR under ticket staging with only two refusals across all staged runs.
“On 199 oracle-backed chains, nine production coding agents produce exploitable diffs at 53-86% end-to-end ASR under ticket staging with only two refusals across all staged runs; on the matched direct prompt over the same chains, Claude produced vulnerable outputs at 0-1.9% while Codex produced them at 9.3-20.4% (Claude refuses; Codex primarily hardens).”
Caveats 5
- Even with full post-apply codebase access, the strongest commercial reviewers approve 8.5-14.6% of confirmed exploits.
- Pentester framing reduces evasion but still leaves a non-trivial gap (evasion 3.0-17.6% across evaluated reviewers).
- Substrates outside web-app boilerplate (Rust services, .NET, mobile, embedded, OS kernels, ML pipelines) are not represented.
- 8 of 10 substrates are at full scale; Spring (3 chains) and Laravel (3 chains) are pilot.
- the oracle is the only authority on exploit truth.
What’s new here 4
- Measures compositional vulnerability induction by chaining three innocuous tickets into a full exploit, a scenario not covered by prior single-prompt safety benchmarks.
- Provides deterministic exploit-oracle ground truth for each chain, enabling reviewer performance to be evaluated against fixed exploit truth rather than heuristic labels.
- Introduces reviewer-protocol framing (neutral vs. pentester) as a first-class variable and shows its impact exceeds model scale or context.
- Releases a publicly available dataset and adaptable evaluation harness for reproducible safety testing of coding agents.