BountyBench: Dollar Impact of AI Agent Attackers and Defenders on Real-World Cybersecurity Systems

Andy K. Zhang, Joey Ji, Celeste Menders, Riya Dulepet, Thomas Qin, Ron Y. Wang, Junrong Wu, Kyleen Liao, Jiliang Li, Jinghan Hu, Sara Hong, Nardos Demilew, Shivatmica Murgai, Jason Tran, Nishka Kacheria, Ethan Ho, Denis Liu, Lauren McLane, Olivia Bruvik, Dai-Rong Han, Seungwoo Kim, Akhil Vyas, Cuiyuanxiu Chen, Ryan Li, Weiran Xu, Jonathan Z. Ye, Prerit Choudhary, Siddharth M. Bhatia, Vikram Sivashankar, Yuxuan Bao, Dawn Song, Dan Boneh, Daniel E. Ho, Percy Liang

TL;DR

BountyBench is a new evaluation framework that measures the real-world economic impact of AI agents on cybersecurity by testing their ability to detect, exploit, and patch vulnerabilities in complex codebases. The study reveals a significant performance gap: while top agents like OpenAI's Codex CLI can successfully patch up to 90% of vulnerabilities, finding them from scratch (zero-day detection) remains a formidable challenge, with success rates peaking at just 12.5%.

What Problem Does This Paper Address?

As AI agents move from simple code completion to autonomous "agentic" workflows, their potential impact on cybersecurity—both as attackers and defenders—is immense. However, existing benchmarks often fall short. Many rely on "Capture the Flag" (CTF) exercises, which are often "toy" problems that don't reflect the messy reality of production software. Others focus exclusively on either offense or defense, failing to capture the full lifecycle of a vulnerability.

The authors argue that to truly understand the risk and progress of AI in cyber, we need a benchmark that uses real-world systems, covers the entire vulnerability lifecycle, and provides a meaningful metric—in this case, the actual dollar value of bug bounties paid out for these vulnerabilities.

Methods

The researchers introduced BountyBench, a framework consisting of 25 diverse, real-world systems and 40 validated bug bounties. They defined three distinct task types to evaluate an agent's capabilities:

  1. Detect: The agent must find and exploit a vulnerability without any prior information (simulating a zero-day discovery).
  2. Exploit: Given a bug report, the agent must create a working exploit script.
  3. Patch: The agent must modify the codebase to fix the vulnerability while ensuring the system remains functional.
Figure 1: BountyBench consists of Detect, Exploit, and Patch tasks, which each pass a distinct task input to the agent. The agent takes an action in a Kali Linux container containing the codebase, which can connect to any server(s) and/or database(s) via the network. Execution of the command yields an observation, which the agent leverages to take additional actions in an action-observation loop until the agent submits the task output to the evaluator, which then scores the submission on various metrics including success/failure, dollar value, and usage metrics.

A key technical contribution is the Detect Indicator. Evaluating open-ended detection is difficult because an agent might find a different bug than the one intended. The researchers solve this by running the agent's exploit against both the current (vulnerable) snapshot and a series of patched snapshots. If the exploit works on the vulnerable version but fails on a specific patched version, the agent has successfully "detected" that specific vulnerability.

Datasets

BountyBench utilizes 25 open-source GitHub repositories (like curl, django, and fastapi) containing 40 bounties. These bounties:

  • Range in value from $10 to $30,485.
  • Cover 9 of the OWASP Top 10 web security risks.
  • Include detailed "snapshots" of the codebase before and after the bug was fixed.

Key Insights and Ideas

  • The Offense-Defense Imbalance: Coding-centric agents (like Claude Code and Codex CLI) are significantly better at defense than offense. They achieved ~90% success in patching but struggled to exploit the same bugs. This is likely because their specialized tools for reading and modifying files are tailor-made for patching, whereas exploitation requires more creative "thinking" and environment interaction.
  • Information as a Difficulty Modulator: The researchers found they could precisely control task difficulty by varying the amount of context provided (e.g., just the vulnerability type vs. the full bug report). As shown in the figure below, performance scales sharply with information.
  • Safety Refusals are a Barrier: Interestingly, the most capable models (o3-high) were also the most likely to refuse tasks due to safety filters (14.1% refusal rate), highlighting a tension between building helpful security tools and preventing malicious use.
Figure 4: On the Detect task with increasing levels of information, we see improvement in agent performance as information increases from detection to exploitation, demonstrating that information is an effective modulator of task difficulty.

Key Results

The evaluation of 10 different agents yielded several striking quantitative findings:

  • Patching is "Solved" for many cases: OpenAI Codex CLI (o3-high and o4-mini) achieved a 90% success rate on Patch tasks, mapping to over $14,000 in "saved" bounty value.
  • Detection is the Frontier: Even the best agent (Codex CLI: o3-high) only succeeded 12.5% of the time on the "No Info" Detect task.
  • Leading Models: Claude 3.7 Sonnet Thinking was the strongest at exploitation (67.5% success), while the OpenAI o3-high models led in detection and patching.
  • Economic Impact: Across all tasks, agents successfully completed $81,067 worth of Patch tasks, but only $9,700 worth of Detect tasks.

Limitations and Future Work

The authors acknowledge that building BountyBench is incredibly labor-intensive; manually setting up environments and writing "gold-standard" exploits and patches takes tens of hours per task. Consequently, the benchmark is currently a static snapshot in time.

Future work aims to automate the creation of these tasks using AI agents themselves. Additionally, the researchers want to explore how agents perform when given access to a web browser, which would allow them to research vulnerabilities and interact with complex web UIs more effectively. Finally, they emphasize the need for more robust "invariants"—tests that ensure an agent's patch doesn't accidentally break other parts of the system.

Summary updated

BibTeX
@inproceedings{zhang2025bountybench,
  author = {Andy K. Zhang and Joey Ji and Celeste Menders and Riya Dulepet and Thomas Qin and Ron Y. Wang and Junrong Wu and Kyleen Liao and Jiliang Li and Jinghan Hu and Sara Hong and Nardos Demilew and Shivatmica Murgai and Jason Tran and Nishka Kacheria and Ethan Ho and Denis Liu and Lauren McLane and Olivia Bruvik and Dai-Rong Han and Seungwoo Kim and Akhil Vyas and Cuiyuanxiu Chen and Ryan Li and Weiran Xu and Jonathan Z. Ye and Prerit Choudhary and Siddharth M. Bhatia and Vikram Sivashankar and Yuxuan Bao and Dawn Song and Dan Boneh and Daniel E. Ho and Percy Liang},
  title = {{BountyBench: Dollar Impact of AI Agent Attackers and Defenders on Real-World Cybersecurity Systems}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=JNPoPyHTHg},
}
Figure