Breaking the Code: Security Assessment of AI Code Agents Through Systematic Jailbreaking Attacks
On the map: LLM agents and tool use → Agent threats, guardrails and governance
also in 1 more
Abstract (arXiv)
Code-capable large language model (LLM) agents are embedded in software engineering workflows where they can read, write, and execute code, raising "jailbreak" stakes beyond text-only settings. Prior evaluations emphasize refusal or harmful-text detection, leaving open whether agents compile and run malicious programs. We present JAWS-Bench (Jailbreaks Across WorkSpaces), a benchmark spanning three escalating workspace regimes mirroring attacker capability: empty (JAWS-0), single-file (JAWS-1), and multi-file (JAWS-M). We pair it with a hierarchical, executable-aware Judge Framework that tests (i) compliance, (ii) attack success, (iii) syntactic correctness, and (iv) runtime executability to measure deployable harm. Across seven LLM backends from five families, prompt-only attacks in JAWS-0 achieve 61% compliance; 58% are harmful, 52% parse, and 27% run end-to-end. In JAWS-1, compliance reaches ~100% for stronger models with a mean ASR (Attack Success Rate) ~71%; JAWS-M raises mean ASR to ~75%, with 32% runnable attack code. Wrapping an LLM in an agent increases ASR by 1.6×, by overturning initial refusals during planning and tool use. Additional evaluations with SWE-Agent and OpenAI Codex exhibit similar trends, indicating that JAWS-Bench can be reused across multiple agent frameworks. Category analyses identify which attack classes are most vulnerable and deployable, motivating execution-aware defenses and refusal-preserving agent designs.
Key facts. Cited by 7 papers in the map (data through 7 Oct 2026). Placed in Agent threats, guardrails and governance, one of 16 directions in LLM agents and tool use. Builds on 25 of its 39 references that are in the map. First posted on arXiv 1 Oct 2025.
Builds on
25 of 39 references.
Closest ancestors · 5
Same direction, newest first
- 2024RedCode: Risky Code Execution and Generation Benchmark for Code Agents12 Nov
- 2024AgentHarm: A Benchmark for Measuring Harmfulness of LLM Agents11 Oct
- 2024Agent Security Bench (ASB): Formalizing and Benchmarking Attacks and Defenses in LLM-based Agents3 Oct
- 2024InjecAgent: Benchmarking Indirect Prompt Injections in Tool-Integrated Large Language Model Agents5 Mar
- 2024Agent Smith: A Single Image Can Jailbreak One Million Multimodal LLM Agents Exponentially Fast13 Feb
Other references · 20
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 2,914
- 2022Competition-Level Code Generation with AlphaCodecited by 1,427
- 2024OpenHands: An Open Platform for AI Software Developers as Generalist Agentscited by 956
- 2023StarCoder: may the source be with you!cited by 790
- 2022Ignore Previous Prompt: Attack Techniques For Language Modelscited by 760
- 2023AutoDAN: Generating Stealthy Jailbreak Prompts on Aligned Large Language Modelscited by 738
- 2023GPTFUZZER: Red Teaming Large Language Models with Auto-Generated Jailbreak Promptscited by 520
- 2024JailbreakBench: An Open Robustness Benchmark for Jailbreaking Large Language Modelscited by 494
- 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
- 2022CodeT: Code Generation with Generated Testscited by 369
8 more
- 2023DeepInception: Hypnotize Large Language Model to Be Jailbreakercited by 337
- 2023A Wolf in Sheep's Clothing: Generalized Nested Jailbreak Prompts can Fool Large Language Models Easilycited by 242
- 2023Automatically Auditing Large Language Models via Discrete Optimizationcited by 187
- 2024COLD-Attack: Jailbreaking LLMs with Stealthiness and Controllabilitycited by 162
- 2024Fast Adversarial Attacks on Language Models In One GPU Minutecited by 85
- 2024CodeAttack: Revealing Safety Generalization Challenges of Large Language Models via Code Completioncited by 70
- 2024RMCBench: Benchmarking Large Language Models' Resistance to Malicious Codecited by 27
- 2024Security Attacks on LLM-based Code Completion Toolscited by 15
Built on by
Citing papers per year: 2025: 1; 2026: 6.
7 papers.
- 2025A Survey on Agentic Security: Applications, Threats and Defensescited by 17
- 2026Do Coding Agents Understand Least-Privilege Authorization?cited by 4
- 2026REDAgentBench: Executable Red Teaming and Faithful Measurement of LLM Agent Systemscited by 4
- 2026MOSAIC-Bench: Measuring Compositional Vulnerability Induction in Coding Agentscited by 3
- 2026LITMUS: Benchmarking Behavioral Jailbreaks of LLM Agents in Real OS Environmentscited by 2
- 2026Refusal Evaluation in Coding LLMs and Code Agents: A Systematic Review of Thirteen Malicious-Code Prompt Corpora (2023-2025)cited by 1
- 2026Refused in Chat, Written in Code: Workflow-Level Jailbreak Construction in IDE Coding Agentscited by 0
- 2026REDAgentBench: Executable Red Teaming and Faithful Measurement of LLM Agent Systems11 Aug 2026
- 2026Refused in Chat, Written in Code: Workflow-Level Jailbreak Construction in IDE Coding Agents4 Jul 2026
- 2026Refusal Evaluation in Coding LLMs and Code Agents: A Systematic Review of Thirteen Malicious-Code Prompt Corpora (2023-2025)19 May 2026
- 2026Do Coding Agents Understand Least-Privilege Authorization?14 May 2026
- 2026LITMUS: Benchmarking Behavioral Jailbreaks of LLM Agents in Real OS Environments11 May 2026
- 2026MOSAIC-Bench: Measuring Compositional Vulnerability Induction in Coding Agents5 May 2026
- 2025A Survey on Agentic Security: Applications, Threats and Defenses7 Oct 2025
Similar, not cited
Close in wording, no citation either way
- 2026CIBER: A Comprehensive Benchmark for Security Evaluation of Code Interpreter Agents
- 2026SoK: Rethinking Jailbreaking in the Era of Agentic AI: Attacks, Defenses, and Practical Consideration
- 2026On Understanding, Identifying, and Mitigating Vulnerabilities in Agentic Large Language Models
- 2025From LLMs to MLLMs to Agents: A Survey of Emerging Paradigms in Jailbreak Attacks and Defenses within LLM Ecosystem
- 2026Prompt Injection Attacks on Agentic Coding Assistants: A Systematic Analysis of Vulnerabilities in Skills, Tools, and Protocol Ecosystems
- 2025SecureVibeBench: Benchmarking Secure Vibe Coding of AI Agents via Reconstructing Vulnerability-Introducing Scenarios
- 2026A Self-Evolving Multi-Agent Framework Defense against LLM Jailbreak Attacks
- 2025"Your AI, My Shell": Demystifying Prompt Injection Attacks on Agentic AI Coding Editors