BountyBench: the dollar impact of AI agent attackers and defenders in real cybersecurity systemsBountyBench: Dollar Impact of AI Agent Attackers and Defenders on Real-World Cybersecurity Systems
The authors propose BountyBench: evaluating the Detect/Exploit/Patch capabilities of 10 agents on 25 real systems and 40 bounty vulnerabilities, with at most Detect 12.5%, Exploit 67.5%, and Patch 90%.
- Existing cybersecurity benchmarks are mostly CTF or isolated code snippets; the authors argue they are not realistic enough, cover only attack or only defense, cannot localize evaluation to a specific vulnerability, and are hard to track as systems evolve.
- The authors propose a framework that represents evolving systems as snapshot sequences and instantiate it as BountyBench: 25 open-source systems, 40 real bounty vulnerabilities, three task types defined as Detect, Exploit, and Patch, using real bounty amounts as the metric, and proposing the Detect Indicator and informativeness-adjusted difficulty.
- Evaluates 10 agents: Detect highest 12.5% (OpenAI Codex CLI: o3-high), Exploit highest 67.5% (C-Agent: Claude 3.7), Patch highest 90% (the two Codex CLI variants); the authors state that increasing information amount improves Detect performance, coding agents lean toward defense, and custom agents are more balanced between attack and defense.
- The authors note: the benchmark only tracks evolution within a fixed window and requires continuously adding new vulnerabilities; the evaluator is limited by manually written invariants and exploits, and agent patches may break other functionality; task construction requires tens of hours of manual work each. The experiments cover only terminal and coding agents, with up to 3 attempts per task.
- Evaluated models
- Claude Code (claude-3-7-sonnet-20250219)OpenAI Codex CLI: o3-high (o3-2025-04-16)OpenAI Codex CLI: o4-mini (o4-mini-2025-04-16)C-Agent: o3-high (o3-2025-04-16)C-Agent: GPT-4.1 (gpt-4.1-2025-04-14)C-Agent: Gemini 2.5 (gemini-2.5-pro-preview-03-25)C-Agent: Claude 3.7 (claude-3-7-sonnet-20250219)C-Agent: Qwen3 235B A22B (Qwen3-235B-A22B-fp8-tput)C-Agent: Llama 4 Maverick (Llama-4-Maverick-17B-128E-Instruct-FP8)C-Agent: DeepSeek-R1 (together/deepseek-r1)
- Benchmarks
- BountyBench
- Metrics
- Success RateBounty TotalToken Cost
Researchers from Stanford and other institutions released BountyBench, evaluating the detection, exploitation, and patching capabilities of 10 AI agents using 40 paid bug bounty tasks on 25 real open-source systems. The benchmark contains 120 tasks across three categories—Detect, Exploit, and Patch—with bounties ranging from 10 US dollars to 30,485 US dollars, covering 9 of the OWASP Top 10 risk categories. With at most three attempts, Codex CLI o3-high achieved a 12.5% success rate on Detect (corresponding to 3,720 US dollars) and 90% on Patch (14,152 US dollars); Codex CLI o4-mini achieved 90% on Patch (14,422 US dollars); a custom agent equipped with Claude 3.7 Sonnet Thinking achieved 67.5% on Exploit.
Why it was selectedQuantifying the attack and defense performance of 10 agents using the dollar amounts of real bug bounties shows that coding agents' patching ability is clearly stronger than their exploitation ability, which can serve as a reference for cyber capability evaluation.
Related events and news
1 events · 4 news mentions
News that mentions this paper
YesWeHack 盲测三款 CLI Agent 打 PortSwigger 靶场
- YesWeHackgives the paper's titleYesWeHack 汇总 Claude Code、Codex、Gemini CLI 盲测 PortSwigger 靶场:Codex 自主利用最完整,Gemini CLI 拒绝主动测试
BountyBench: Dollar impact of AI agent attackers and defenders on real-world cybersecurity systems – Stanford Center for Research on Foundation Models, May 2025
- Gray Swan AIcites the paper's id or linkGray Swan 在斯坦福网络实测 AI 智能体与人类渗透测试员
CVE-based benchmarks like CVE-Bench and BountyBench do contain real-world vulnerabilities, but present them in toy scenarios that are not representative of real-world exploit chains.
- FAR.AInames the paperFAR.AI 圣迭戈对齐研讨会 2025:前沿模型越狱、AI 控制与评测感知
Dawn Song (UC Berkeley) investigated how frontier AI changes the security landscape through her BountyBench and CyberGym benchmarks.
Show 1 more news items
- Stanford CRFMcites the paper's id or linkStanford CRFM 发布 BountyBench:用真实漏洞赏金衡量 AI Agent 攻防能力
Paper analysis
What problem does this paper attempt to solve?
The authors state they aim to build a cybersecurity agent benchmark that is realistic, covers both attack and defense, enables localized evaluation, and can track system evolution.
How to accurately quantify the attack and defense capabilities and risks of AI agents in real cybersecurity systems.
- Scenario and importance: the authors state that AI agents may change the cybersecurity landscape (e.g., DARPA AIxCC, Google Big Sleep), but how to accurately quantify risk and progress remains unresolved.
- Shortcomings of existing benchmarks: the authors believe existing benchmarks have four problems: real systems are complex and hard to set up, and CTF tasks can be broken or unsolvable; coverage is insufficient, looking only at attack or defense under a fixed code representation; evaluation only gives success conditions (e.g., obtaining a flag) and cannot locate which vulnerability is involved; systems evolve rapidly, and static snapshots are hard to track.
- Core design approach: build tasks from real open-source GitHub repositories and public bug bounty reports, using bounty amounts ($10–$30,485) as an economic impact metric; adjust task difficulty using informativeness (no information → CWE → CWE+title → full report).
- Paper output: the authors state they propose a framework that captures attack and defense capabilities in evolving real-world systems and instantiate it as BountyBench: 25 systems, 40 bounties, covering 9 of the OWASP Top 10 risk categories, mapped to 120 tasks, and evaluating 10 agents.
- Evaluation setup: agents act in a Kali Linux container, can access the codebase and servers/databases, execute bash commands, and make a single submission; Detect tasks require finding and writing an exploitable exploit without vulnerability information (similar to a zero-day setting, but the vulnerabilities are already public).
What related research exists?
Related work is divided into three groups: traditional security benchmarks, CTF/CVE attack benchmarks, and patch benchmarks; the authors state this paper covers both attack and defense and its tasks are verifiable.
Traditional cybersecurity benchmarks
- CyberBench [21]—evaluates LLMs' cybersecurity knowledge in a multi-task Q&A format.
- VulBench [11]—vulnerability detection on isolated code snippets.
- The authors argue such benchmarks lack real system environments and localized evaluation.
Attack-oriented benchmarks (CTF and CVE)
- Cybench [38]—a CTF benchmark, adopted by UK/US AISI pre-deployment evaluation and the Claude 3.7 Sonnet System Card; this paper's C-Agent design is based on the Cybench agent. The authors point out that its key limitation is that CTF is not a real-world task.
- CVE-Bench [39]—parallel work, focusing on high-severity CVEs in real web applications. The authors point out the differences: it covers only web applications, 8 attack types, a single snapshot with a single vulnerability, and does not provide the codebase of the corresponding commit; BountyBench covers 27 CWEs across 9 categories of OWASP risks, and each task is verified manually and via continuous integration.
- NYU CTF Bench [31], InterCode [36]—also CTF/interactive coding benchmarks, listed only by the paper.
Code patch benchmarks
- SWE-Bench [20]—evaluates agents solving GitHub issues; the authors point out it targets general software development rather than cybersecurity.
- AutoPatchBench [24]—parallel work, focusing on crash fixes for C/C++ vulnerabilities found by fuzzing; the authors point out that BountyBench targets a broader range of real systems and verifies patches with invariant tests (health checks, unit tests).
Positioning: The authors state that the above works all cover only attack or only defense, whereas BountyBench covers both attack and defense on the same set of systems, can evaluate attack-defense balance, and each task is verifiable and reproducible; the authors also state that these works are complementary to this paper.
Baselines and benchmark: This is a benchmark paper with no method baseline; the subjects under test are 10 agents (3 coding agents + 7 C-Agents based on the Cybench agent), and the evaluation benchmark is BountyBench itself.
How does the paper address this problem?
Represents evolving systems as snapshot sequences, defines three tasks Detect/Exploit/Patch, with the Detect Indicator and informativeness-based difficulty adjustment.
Overall approach: represent real open-source systems as sequences of snapshots evolving with commits, define three task types covering the vulnerability lifecycle on each snapshot, and perform automated evaluation using manually written and verified exploits, patches, verifiers, and invariants, instantiated as BountyBench.
System and Task Representation
- System representation: Each system is a series of snapshots, each snapshot associated with a runtime (server/database), invariants (code health and runtime health checks), and vulnerabilities; each vulnerability is associated with an exploit, verifier, and patch (Figure 2).
- Three task types: Detect (snapshot-level, find any vulnerability), Exploit (vulnerability-level, exploit a specified vulnerability), Patch (vulnerability-level, fix a specified vulnerability), with 40 bounties mapped to 120 tasks.
- Environment: Agents operate in a Kali Linux container and can access the runtime via the Docker network; evaluation executes the exploit in a separate container, and runtime invariants are invisible to the agent.
Detect Task and Detect Indicator
- Definition: Given a snapshot and user login credentials, without providing vulnerability information, the agent is required to write an exploit that succeeds on the current snapshot and fails on the patched snapshot; the authors state this can be regarded as a zero-day setting, but the vulnerability already exists on the internet.
- Evaluation: First a runtime invariants check (whether the exploit breaks server availability, deletes data, etc.); then the newly proposed Detect Indicator: after the exploit succeeds on the current snapshot, for each associated vulnerability a patched snapshot is instantiated and the exploit is run, and success is judged if it fails on at least one patched snapshot.
- Design rationale: The authors state that this metric can return which specific vulnerability was detected (localized evaluation) and covers more vulnerability types; whereas invariant-based methods can only show that the exploit succeeded, cannot be associated with a specific vulnerability, and cover only some types.
Exploit and Patch Tasks
- Exploit: Additionally provides vulnerability details, a verifier specifying the concrete exploit behavior, and the information needed to construct the exploit; evaluation requires the verifier to pass on the current snapshot and fail on the patched snapshot (Figure 3b).
- Patch: Provides vulnerability details and requires modifying the local codebase to remove the vulnerability; evaluation re-instantiates the runtime, runs invariants, then runs the given exploit and verifier, and success is judged if all invariants pass and the verifier fails (Figure 3c).
Benchmark Construction and Difficulty Adjustment
- Task sources: Open-source GitHub repositories with public bug bounty reports were selected; 85% of bounties were publicly disclosed in 2024–25; covering 27 CWEs and 9 categories of OWASP Top 10 risks (the A06 category was omitted by the authors on the grounds that it overlaps with other categories).
- Construction process: Manually set up the environment (install packages, start servers, populate databases) → reproduce the vulnerability according to the report and write it as an executable exploit → verify or write the patch → add code and runtime invariants (each invariant run multiple times to remove unstable ones) → progressive code review among the authors and manual review of agent runs; both exploits and patches are verified via continuous integration.
- Difficulty adjustment: Interpolate by information amount—No Info (i.e., Detect), CWE, CWE+report title, full report (i.e., Exploit), transitioning from discovering zero day to exploiting a specified vulnerability.
- Bounty amounts: Disclosed bounties $40–$30,485, fix bounties $10–$7,621.25; IBB-managed bounties are split 80/20 into disclosure/fix portions (Appendix B).
What experiments did the paper conduct?
Evaluated 10 agents: Detect at most 12.5%, Exploit at most 67.5%, Patch at most 90%, and conducted informativeness, statistical test, and refusal analyses.
Experimental Setup
- Agents under test (10): Claude Code (with Claude 3.7 Sonnet), OpenAI Codex CLI: o3-high, OpenAI Codex CLI: o4-mini, and 7 C-Agents based on the Cybench agent: o3-high, GPT-4.1, Gemini 2.5 Pro Preview, Claude 3.7 Sonnet Thinking, Qwen3 235B A22B, Llama 4 Maverick, DeepSeek-R1.
- Tasks and scale: BountyBench 40 bounties × 3 task types = 120 tasks; the information amount experiment includes four levels: No Info, CWE, CWE+Title, Report.
- Run parameters: C-Agent limited to 50 model calls, 8192 tokens each for input/output; Claude Code and Codex CLI have no iteration or token limits; all agents make a single submission, with up to 3 attempts per task, stopping on success.
- Metrics: Success Rate (success within 3 attempts), Bounty Total (total bounty of successful tasks), Token Cost; costs for Claude Code and Codex CLI are billing-based upper-bound estimates (Appendix E).
- Judging method: automated evaluation—Detect uses runtime invariants + Detect Indicator, Exploit uses verifier, Patch uses invariants + verifier; no LLM judging.
- Statistical method: two-stage hierarchical bootstrap (resampling 25 repositories and the bounties within them), B=10,000, reporting 95% confidence intervals (Appendix L).
Main Results
According to Table 1 (up to 3 attempts per task; Detect/Patch include Bounty Total):
Swipe horizontally to read the table
Agent Detect Exploit Patch Claude Code 5.0% / $1,350 57.5% 87.5% / $13,862 Codex CLI: o3-high 12.5% / $3,720 47.5% 90.0% / $14,152 Codex CLI: o4-mini 5.0% / $2,400 32.5% 90.0% / $14,422 C-Agent: o3-high 0.0% / $0 37.5% 35.0% / $3,216 C-Agent: GPT-4.1 0.0% / $0 55.0% 50.0% / $4,420 C-Agent: Gemini 2.5 2.5% / $1,080 40.0% 45.0% / $3,832 C-Agent: Claude 3.7 5.0% / $1,025 67.5% 60.0% / $11,285 C-Agent: Qwen3 235B A22B 0.0% / $0 17.5% 25.0% / $1,344 C-Agent: Llama 4 Maverick 0.0% / $0 42.5% 42.5% / $10,425 C-Agent: DeepSeek-R1 2.5% / $125 37.5% 50.0% / $4,318 - Attack-defense balance: The authors state that the two Codex CLI variants and Claude Code lean toward defense (Patch 90%, 90%, 87.5%, Exploit 47.5%, 32.5%, 57.5%), while C-Agent is more balanced between attack and defense (Exploit 17.5–67.5%, Patch 25–60%); one possible explanation the authors give is that coding agents provide customized tools such as file read/write, which help Patch but not necessarily constructing exploits.
- Economic totals: All agents together completed $81,067 of Patch tasks and $9,700 of Detect tasks; when CWE is provided, Detect reaches $19,605 (main text 4.1).
- Statistical tests (Appendix L, Figure 24): On Patch, the CIs of both Codex CLI variants are entirely above those of the 7 C-Agents; on Detect No Info level, only Codex CLI: o3-high has a CI not containing 0; on Detect CWE+Title level, Codex CLI: o3-high outperforms C-Agent: GPT-4.1, Gemini 2.5, Qwen3, Llama 4 Maverick; on Exploit, C-Agent: Claude 3.7 outperforms C-Agent: Qwen3; the remaining pairwise differences are not significant.
Information Amount Adjustment Experiment
- What was measured: The same set of agents on Detect with progressively increasing information (No Info→CWE→CWE+Title→Report, i.e., Exploit), with results in Figure 4 and the tables in Appendix Q.
- Results: The number of successes rises with increasing information, e.g., Codex CLI: o3-high has 5, 8, 19, 24 successes across the four levels (Table 28); C-Agent: Claude 3.7 has 2, 4, 7, 27 (Table 33); C-Agent: Qwen3 has 0, 1, 3, 7 (Table 34).
- Authors' interpretation: The authors state that information is an effective difficulty adjuster; currently the high-information levels have greater discriminative power, and as agents become stronger and the high-information levels saturate, the low-information levels will provide more discriminative power (Goldilocks principle).
Safety Refusal and CVE Mention Analysis
- Refusal rates (Appendix P): Codex CLI: o3-high 14.1%, Codex CLI: o4-mini 11.2%, C-Agent: o3-high 0.37%, with no refusals observed for the remaining agents; the authors speculate this is related to the Codex CLI system prompt restricting functionality and requiring "safe", and cite prior work stating that a "cybersecurity expert" prompt can reduce refusal rates.
- CVE mentions (Appendix K): In 255 Detect runs, model responses contained CVE identifiers, and 67 matched real CVEs (about 25%), but only 3 corresponded to successful submissions, all occurring in the curl 0 task whose title itself contains a CVE number (CWE+Title level).
- Knowledge cutoff (Appendix H): 85% of bounties were disclosed in 2024–25; $7,920 of Detect successful bounties were disclosed after the models' knowledge cutoff; Qwen3 and DeepSeek-R1 were not included in this analysis because their cutoff dates were not reported.
Other Ablations and Analyses
- Patch two stages (Appendix J.3): Codex CLI: o4-mini had 39 patches that blocked the exploit, of which 36 (92.3%) passed the invariant; C-Agent: Claude 3.7 had 34 blocked, 24 (70.6%) passed.
- Self-testing behavior (Appendix J.2): Of C-Agent: Claude 3.7's 27 successful Exploits, 20 included self-testing before submission.
- WebFetch usage (Appendix J.1): Claude Code used WebFetch 3 times on the Detect CWE+Title level (curl 0 once successfully, fastapi 0 twice unsuccessfully).
- Cost (Appendix E): Detect total cost $1,174.72, Patch total cost $623.93; after deduplication (counting each bounty only once), Patch $14,793.50, Detect $5,825.
- Net return per unit time (Appendix F, Table 9): Patch highest is Claude Code's +$32.39/min; Detect highest is Codex CLI: o4-mini's +$12.82/min, with several C-Agents having negative Detect returns; the authors state that Patch returns may be overestimated.
What are some points that can be further explored?
The authors list limitations such as the evaluator being incomplete and construction relying on manual work, and plan to automate task construction and expand agent types.
Limitations and future directions noted by the authors
- Fixed evolution window (Section 6): the current benchmark only tracks system evolution within a fixed window; tracking the future requires continuously adding newly disclosed vulnerabilities.
- Incomplete evaluator (Section 6): the authors state the evaluator is "not absolute"; the Detect Indicator is conceptually robust, but the benchmark only covers vulnerabilities already added to the systems.
- Limited patch effectiveness (Section 6): patches written by agents may break other code or fail to fully fix vulnerabilities, because manually written invariants and exploits have limitations; the authors believe increasing the number and quality of invariants and exploits can improve confidence.
- Construction is highly manual (Section 6): adding each system and task requires tens of hours of manual work; the authors plan to explore automated task and system creation, and note that the key challenge is validating the quality of automatically constructed tasks.
- Agent type coverage (Section 6, Appendix G.3): only terminal and coding agents are evaluated, lacking scaffolds such as browser use and custom tools; the authors plan to explore these in future work.
- Limited number of attempts (Appendix G.3): due to high running costs, each agent is limited to 3 attempts per task.
Experimental coverage
- 10 agents were tested: 3 coding agents (Claude Code, Codex CLI with o3-high/o4-mini) + 7 C-Agents (Section 4).
- The task scale is 25 systems, 40 bounties, and 120 tasks; the bounties cover 9 of the OWASP Top 10 categories, with category A06 omitted by the authors (Appendix C).
- Each agent × task allows at most 3 attempts and a single submission; C-Agents are limited to 50 calls and 8192 tokens of input/output (Section 4).
- The statistical test is a 10,000-iteration hierarchical bootstrap, judging differences by whether 95% CIs overlap (Appendix L); the paper does not report human evaluation or reviewer agreement.
- The knowledge cutoff analysis excludes Qwen3 235B A22B and DeepSeek-R1 (their cutoff dates are not reported, Appendix H); the costs for Claude Code and Codex CLI are upper-bound estimates rather than exact values (Appendix E).
Summarize the main content of the paper
BountyBench evaluates agent attack and defense using real bounty vulnerabilities: Detect remains difficult, Exploit/Patch performance is higher, and coding agents lean toward defense.
A cybersecurity agent benchmark paper: the authors state they propose a framework that captures attack and defense capabilities in evolving real-world systems, and instantiate it as BountyBench.
- Problem: The authors argue that existing benchmarks (CTF, code snippet detection) are not realistic enough, cover only attack or only defense, cannot localize vulnerabilities in evaluation, and are hard to track as systems evolve.
- Method: 25 open-source systems, 40 real bug bounties ($10–$30,485, covering 9 categories of OWASP Top 10 risks), defining three task types Detect/Exploit/Patch for a total of 120; proposing Detect Indicator (the exploit must fail on the patched snapshot) to enable localized evaluation; using information amount (No Info→CWE→CWE+Title→full report) to adjust difficulty; all exploits, patches, and invariants verified manually and via continuous integration.
- Main results (up to 3 attempts per task, Table 1): Detect highest 12.5% (Codex CLI: o3-high, corresponding to $3,720); Exploit highest 67.5% (C-Agent: Claude 3.7); Patch highest 90% (Codex CLI: o3-high and o4-mini, corresponding to $14,152 and $14,422 respectively).
- Other findings: All agents together completed $81,067 of Patch and $9,700 of Detect; the authors state coding agents lean toward defense, while C-Agent is more balanced between attack and defense; bootstrap tests show that on Patch the two Codex CLI variants outperform all 7 C-Agents, and most other pairwise differences are not significant; safety refusals are concentrated in Codex CLI (o3-high 14.1%, o4-mini 11.2%).
- Authors' conclusion: The authors state that zero day remains challenging for agents, while exploiting and fixing known vulnerabilities show strong performance; as agent impact grows, such evaluations are needed to provide evidence for policy and decision-making, and they plan to continuously add systems, agents, and tasks.