arXiv:2609.31318cs.CRSep 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2609.31318

AgentXploit: Autonomous Repository-to-Runtime Red-Teaming for AI Agents

Weida Liang, Shi Qiu, Zhun Wang, Simon Sure, Xiaoyuan Liu, Tianneng Shi, Zhaorun Chen, Wenbo Guo, Dawn Song

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

AI agents combine language models with external data and tools that can modify files, call APIs, or execute code. Security failures can arise when adversarial content changes an agent's tool use or when the surrounding software contains vulnerabilities such as path traversal or command injection. We study authorized white-box pre-deployment auditing, where the auditor has access to the target repository and a controlled runtime, but successful attacks must still act through the task-defined attacker interface and be confirmed by an external verifier. We present AgentXploit, a two-role auditing system that separates repository-level attack-path discovery from runtime exploitation. The Analyzer Agent traces attacker-controlled inputs to sensitive operations and records code-supported candidate attack paths; the Exploiter Agent turns these paths into concrete attacks and revises them using runtime feedback. We also introduce AgentXploit-Bench, containing 72 reproducible vulnerabilities across 12 open-source AI-agent systems and frameworks. Across three runs, AgentXploit reaches 59.3% end-to-end success, compared with 38.4% for Codex. Under a token-budget-matched comparison, Codex reaches 46.3%. On AgentDojo, where injection points are provided, the Exploiter Agent reaches 79.2% attack success versus 52.7% for AgentVigil. These results highlight repository discovery and runtime exploitation as distinct challenges in end-to-end agent security auditing. Code, benchmark, and evaluation artifacts are available at https://github.com/lwd17/AgentXploit.

1. Introduction

Large Language Models (LLMs) can plan, reason, and use tools (OpenAI, 2024; DeepSeek-AI, 2025; Google, 2025; Zhou et al., 2023b; Wang et al., 2025a). Agent systems build on these capabilities by connecting models to files, browsers, code execution, APIs, and communication services (Anthropic, 2025; Team, 2025; OpenAI, 2025; Wang et al., 2025a; Assafelovic, 2024). Agent security failures can arise through both model behavior and surrounding software. Adversarial content may steer an LLM toward a sensitive tool call, while the implementation itself may expose flaws such as path traversal or command injection (Zhang et al., 2024a; Li et al., 2024; He et al., 2024; Debenedetti et al., 2024). In either case, an auditor must determine whether attacker-controlled data can actually reach a sensitive operation.

Most existing agent red-teaming methods assume that the injection point or attack surface is already known (Wang et al., 2025c; Chen et al., 2024d; Perez and Ribeiro, 2022; Wu et al., 2024b). They test how to optimize an adversarial input, but not whether an auditor can discover a viable path from the implementation itself. In a repository-scale agent, finding such a path requires more than listing inputs and sensitive tools: the auditor must determine which inputs are consumed, how values move across components, which model or control-flow decisions they can influence, and whether tool preconditions hold.

We study authorized white-box pre-deployment auditing. The auditor may inspect the target repository and controlled runtime, but an exploit counts only if it is executed through the task-defined attacker interface and confirmed by an external verifier. Section 3 formalizes this access model.

The audit has two steps: discovering a feasible attack path in the repository and validating it in the running system. We separate them in AgentXploit. The Analyzer Agent retains evidence across a long repository search and writes candidate attack paths to a machine-readable report. The Exploiter Agent reads that report, attacks the target through the attacker interface, and revises unsuccessful attempts using the target response and permitted execution trace.

1^{1}National University of Singapore; 2^{2}University of North Carolina at Chapel Hill; 3^{3}University of California, Berkeley; 4^{4}University of Chicago; 5^{5}University of California, Santa Barbara; ∗^{*}Equal contribution.

Preprint

Figure

Figure 1. Overview of AgentXploit. The Analyzer Agent searches the repository and records candidate attack paths with supporting code evidence. The evaluation harness launches an isolated target, and the Exploiter Agent tests those paths only through the attacker interface. An external deterministic verifier, rather than the agent, checks the specified security outcome.

AgentXploit Figure 1 shows the two roles and their hand-off:

• Analyzer Agent. It maintains an investigation queue and an evidence report while using search, dependency, symbol, AST, and LSP tools to trace candidate attack paths from external inputs to sensitive operations.

• Exploiter Agent. It receives those paths, constructs attacks against the isolated target, and revises them from runtime feedback. For prompt-injection tasks, it can select an initial seed and coordinate instructions across multiple injection locations.

Illustrative path Consider an agent that retrieves an attacker-controlled document and passes its contents to an LLM before choosing a file-access tool. The exposed retrieval interface is easy to list, but the vulnerability depends on a cross-component chain: the document must be consumed, influence the tool call, and reach a file operation under the required preconditions. The Analyzer Agent records this chain and its code evidence; the Exploiter Agent then places adversarial content through the retrieval interface and tests whether the isolated target performs the operation.

Why a new benchmark Existing prompt-injection benchmarks generally provide the injection point, so they can evaluate attack generation but not source-based path discovery. AgentXploit-Bench is designed around the missing question: can an auditor recover and validate a feasible attack path when the vulnerability and injection point are not supplied? It contains 72 reproducible vulnerability instances drawn from public CVEs and security issues across 12 open-source AI-agent projects. Each task includes a pinned runtime and an external deterministic verifier. The end-to-end task withholds vulnerability-specific metadata; analysis-only and exploit-only modes diagnose the two stages separately.

Evaluation Averaged over three runs on AgentXploit-Bench, AgentXploit reaches 59.3% end-to-end success, compared with 38.4% for Codex (OpenAI, 2025). The mean difference is 30.8 percentage points on the 13 indirect paths and 18.6 points on direct paths. Under a token-budget-matched comparison, Codex reaches 46.3%, leaving a 13.0-point difference from AgentXploit. In the initial run used for the framework breakdown, AgentXploit succeeds on 24/50 instances outside GPT_Academic and Codex on 14/50. AgentDojo (Debenedetti et al., 2024) supplies the injection points and therefore isolates the runtime attack stage; there, the Exploiter Agent reaches 79.2% success, versus 52.7% for AgentVigil and 41.5% for handcrafted attacks. To characterize what these success rates omit, we also audit Analyzer Agent candidate precision and evaluate signature-level detectability and benign utility preservation on a preselected set of seven tasks from five frameworks with available runtimes.

Contributions Our contributions are:

  • a two-role system that passes code-supported candidate attack paths from repository analysis to runtime testing;

• AgentXploit-Bench, with 72 reproducible vulnerabilities, pinned runtimes, and deterministic verifiers for analysis-only, exploit-only, and end-to-end evaluation; and

  • an evaluation that localizes discovery and exploitation failures, controls for code-surface and model-token effects, and separately measures candidate quality and attack quality.