Task-specific script replacement attacks succeed up to 84% on long-horizon agents
Script-replacement attacks achieve high success rates against agents in shared workspaces
AI/ML arXiv 9 Oct 2026 Benchmark Prototype evidence
Published as “APEX-Harm: Evaluating Agent Safety in Shared Professional Workspaces”
Why it matters
The results demonstrate that even high-performing LLM agents can be coaxed into unsafe actions in realistic shared workspaces, highlighting the need for stronger safety mechanisms before deployment in professional environments.
Summary
Task-specific script replacement and attacker-provided generic script attacks are highly effective, achieving 81-84% and 73% attack success respectively, even though some models (e.g., Opus 5, Sonnet 5) have low overall attack success rates of 8% and 20%. Gemini 3.8 Flash attains the highest task performance (0.877) but still suffers a 33% attack success rate, showing that completing the task does not guarantee safety. The benchmark evaluates 12 frontier models on 180 task instances each in shared professional workspaces.
What they found 3
- Opus 5 and Sonnet 5 have the lowest overall attack success rates (8% and 20%)
“Opus 5 and Sonnet 5 have the lowest overall attack success rates (8% and 20%), while task-specific script replacement and attacker-provided generic script attacks remain substantially more effective, averaging 81-84% and 73% attack success, respectively.”
- Task-specific script replacement and attacker-provided generic script attacks achieve high success (81-84% and 73%)
“task-specific script replacement and attacker-provided generic script attacks remain substantially more effective, averaging 81-84% and 73% attack success, respectively.”
- Gemini 3.8 Flash gets the highest mean task score (0.877) but still has a 33% attack success rate
“Gemini 3.8 Flash achieves the highest mean task score (0.877) while still exhibiting a 33% attack success rate.”
Caveats 3
- Opus 5’s task-specific script replacement attack succeeds only 13% of the time, contradicting the overall average of 81-84% success.
- Gemini 3.8 Flash attains the highest utility score yet still suffers a 33% attack success rate, indicating high performance does not imply safety.
- Our evaluation primarily relies on rule-based checks, which cover 94% of safety assessments and 70% of exposure assessments (Appendix B and Table 11).
What’s new here 4
- Evaluates LLM agents in large shared professional workspaces (115-328 files) rather than single-file settings.
- Introduces six attack categories covering static/dynamic prompt injection, script replacement, and generic script attacks.
- Measures both attack success and exposure rates to distinguish unseen attacks from successful malicious actions.
- Provides a systematic comparison with existing-file placement baselines under a stronger threat model.