Automated repository poisoning succeeds over 60% against coding agents
TrojanForge can poison code repositories with a success rate above 60% and backdoor injection above 90%
Security & privacy arXiv 16 Oct 2026 Attack Prototype evidence
Published as “Trojan Horse: Automated Repository Poisoning against Coding Agents”
Why it matters
The work shows that current coding agents are vulnerable to automated repository poisoning, highlighting an urgent need for stronger safety mechanisms.
Summary
TROJANFORGE automatically generates repository-level poisoning attacks that succeed on average over 60% of the time, with backdoor injection success exceeding 90%, and even commercial coding agents fail to defend. The system parses repositories with ASTs, ranks low-suspicion mount points, iteratively refines disguises via adversarial feedback, and transfers learned strategies across repos. Experiments on the 384-repo TROJANBENCH benchmark across 4 harnesses and 12 models support these numbers, though overall success caps around 65% in some settings.
What they found 2
- TROJANFORGE achieves the highest attack success rates across all payload carriers.
“TROJANFORGE achieves the highest ASR across all carriers, with 76.5% on exfiltration, 44.1% on destruction, 85.3% on tampering, and 94.1% on backdoor insertion.”
- Backdoor injection succeeds at over 90% ASR in every evaluated setting.
“Backdoor injection is the most damaging carrier, with an ASR exceeding 90% in all settings.”
Caveats 4
- Overall poisoning success is limited to about 65% when agents exhibit stronger safety awareness.
- Some payloads achieve lower success (e.g., destruction only 44.1% ASR).
- Producing a successfully poisoned repository requires multiple iterative rounds of refinement, which makes large-scale runs costly.
- The released package omits the attack generation pipeline and poisoned instances, limiting direct reuse.
What’s new here 4
- End-to-end automated generation of poisoned repositories without human selection.
- AST-based reachability analysis that maps agent execution traces to code locations.
- A security-review agent that ranks candidate mount points by suspiciousness to find blind spots.
- Iterative disguise refinement using detection feedback and experience transfer across repositories.