Collaborative prompt optimization can be hijacked by injected malicious instructions
CPInj can inject malicious instructions into the aggregated prompt, degrade task performance, and evade existing defenses
AI/ML arXiv 21 Jul 2026 Attack Simulation evidence
Published as “CPInj: Uncovering Prompt Injection Risks in Textual Collaborative Prompt Optimization”
Why it matters
The work shows that current TCPO deployments are vulnerable to persistent prompt injection, prompting the need for new aggregation-level defenses.
Summary
CPInj achieves the highest attack success rates and large accuracy drops across multiple LLMs and reasoning tasks, while existing detection defenses only partially mitigate it; the proposed APAgg aggregation method lowers attack success and recovers some accuracy but does not fully restore vanilla performance.
What they found 3
- CPInj causes large performance degradation and the highest attack success rates across models and tasks.
“CPInj causes significant performance drops and achieves the highest attack success rate across almost all models and benchmark tasks.”
- APAgg lowers attack success and recovers part of the clean-task accuracy.
“APAgg reduces attack success rates while preserving clean task accuracy, establishing a stronger baseline for future defense research on TCPO.”
- The attack remains effective even when the malicious client ratio is as low as 6.67%.
“it consistently degrades accuracy, and remains effective even when the malicious ratio drops to 6.67%”
Caveats 4
- Existing detection-based defenses and APAgg still fail to consistently recover performance to the level of vanilla FedTextGrad.
- they still fail to consistently recover performance to the level of vanilla FedTextGrad.
- APAgg ... still fails to consistently restore performance to the vanilla FedTextGrad level in many settings.
- robust defense for TCPO remains an important direction for future research.
What’s new here 4
- Identifies a previously unstudied prompt injection attack surface specific to textual collaborative prompt optimization (TCPO).
- Introduces a multi-objective loss (behavior, priority, similarity, distinctness, redirect, stealth) to craft persistent, stealthy malicious prompts.
- Demonstrates that the attack survives multi-round aggregation and outperforms prior single-turn attacks like CatAttack and QueryGCG.
- Proposes APAgg, a defense-oriented aggregation technique that purifies prompts while preserving task utility.