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:
- Detect: The agent must find and exploit a vulnerability without any prior information (simulating a zero-day discovery).
- Exploit: Given a bug report, the agent must create a working exploit script.
- Patch: The agent must modify the codebase to fix the vulnerability while ensuring the system remains functional.
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.
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