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 SongarXiv 2026

TL;DR

AgentXploit is a new autonomous red-teaming framework that bridges the gap between static code analysis and dynamic exploitation for AI agents. By splitting the auditing process into two specialized roles—an Analyzer Agent for repository-scale path discovery and an Exploiter Agent for runtime validation—it achieves a 59.3% success rate in identifying and exploiting real-world vulnerabilities, significantly outperforming general-purpose coding agents like Codex.

What Problem Does This Paper Address?

AI agents are more than just Large Language Models (LLMs); they are complex software systems that connect models to tools like file systems, web browsers, and code executors. This architecture introduces a dual-threat landscape: an agent can be subverted via prompt injection (steering the model's logic) or via traditional software flaws (like command injection or path traversal) in the code that wraps the model.

Most existing red-teaming benchmarks simplify the problem by providing the "injection point"—the specific place where an attacker can input data. In the real world, an auditor first has to find that point within thousands of lines of code. The authors argue that discovering a viable "attack path"—how untrusted input flows through the system to reach a sensitive operation—is a distinct and often harder challenge than generating the exploit itself.

Methods

The researchers introduced a two-role system designed for white-box pre-deployment auditing:

  1. The Analyzer Agent: This agent acts as a security researcher. It uses a suite of tools (AST, LSP, symbol search) to map the repository. Its goal is to trace data flow from external inputs (like an API or a retrieved document) to sensitive "sinks" (like subprocess.run or file writes). It produces a machine-readable report detailing candidate attack paths and code evidence.
  2. The Exploiter Agent: This agent takes the Analyzer’s report and attempts to prove the vulnerability in a live, isolated runtime. It crafts payloads, observes the agent's response and execution traces, and iteratively refines its attack based on feedback.
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.

Crucially, success is determined by an external deterministic verifier. The agent cannot simply "claim" it succeeded; the verifier must confirm the intended security outcome (e.g., a specific file was read or a command was executed).

Datasets

The paper introduces AgentXploit-Bench, a new benchmark consisting of 72 reproducible vulnerabilities drawn from real-world CVEs and security issues across 12 popular open-source AI agent frameworks.

Table 3. Framework distribution in AgentXploit-Bench.

The benchmark supports three evaluation modes:

  • Analysis-only: Can the system find the ground-truth attack path in the code?
  • Exploit-only (Oracle): Given the vulnerability description, can the system craft a working exploit?
  • End-to-end: The primary task—finding and exploiting the path from scratch.

The authors also evaluated the Exploiter Agent on AgentDojo, a standard benchmark for prompt injection where injection points are already known.

Key Insights and Ideas

  • Discovery is the Bottleneck: In their failure analysis, 69% of end-to-end failures occurred during the analysis stage. If the system can't find the path in the code, it never gets a chance to test the exploit.
  • Indirect Paths are Harder: Attacks that involve "indirect" inputs—like a document the agent retrieves that then influences a later tool call—are significantly more difficult to discover and exploit than "direct" inputs like a user query.
  • Exploitability $\neq$ Stealth: The authors found that while many attacks were successful, they often triggered standard Web Application Firewall (WAF) signatures. This highlights that making an attack work is different from making it stealthy.
Table 5. Scoped attack-quality diagnostics. Utility reports success- ful benign requests before and after the attack.

Key Results

  • End-to-End Performance: AgentXploit reached a 59.3% success rate on AgentXploit-Bench, compared to 38.4% for a Codex baseline. Even when Codex was given a matched token budget, AgentXploit maintained a 13-point lead.
  • Exploitation Efficiency: On the AgentDojo benchmark (where discovery isn't required), the Exploiter Agent achieved 79.2% success, outperforming specialized baselines like AgentVigil (52.7%).
  • Robustness: The system remained effective even after "code mutation" (renaming functions and variables), suggesting it relies on semantic understanding of data flow rather than just pattern-matching known CVE identifiers.

Limitations and Future Work

  • Contamination: Since the benchmark uses public CVEs, there is a risk that the underlying LLMs (like GPT-4o) were exposed to these vulnerabilities during training. The authors mitigated this with code mutation experiments, but it remains a factor.
  • Adjudication Cost: Currently, matching the Analyzer's output to the ground truth requires manual effort. Automating this "analysis-only" metric is a goal for future versions.
  • Stealth and Utility: The current framework focuses on whether an attack can happen. Future work is needed to evaluate "attack quality"—how well an exploit preserves the agent's normal functionality while remaining undetected.

Summary updated

BibTeX
@misc{liang2026agentxploit,
  author = {Weida Liang and Shi Qiu and Zhun Wang and Simon Sure and Xiaoyuan Liu and Tianneng Shi and Zhaorun Chen and Wenbo Guo and Dawn Song},
  title = {{AgentXploit: Autonomous Repository-to-Runtime Red-Teaming for AI Agents}},
  year = {2026},
  eprint = {2609.31318},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2609.31318},
}
Figure