Cybench: A Framework for Evaluating Cybersecurity Capabilities and Risks of Language Models

Andy K Zhang, Neil Perry, Riya Dulepet, Joey Ji, Celeste Menders, Justin W Lin, Eliot Jones, Gashon Hussein, Samantha Liu, Donovan Julian Jasper, Pura Peetathawatchai, Ari Glenn, Vikram Sivashankar, Daniel Zamoshchin, Leo Glikbarg, Derek Askaryar, Haoxiang Yang, Aolin Zhang, Rishi Alluri, Nathan Tran, Rinnara Sangpisit, Kenny O Oseleononmen, Dan Boneh, Daniel E. Ho, Percy Liang

As language models (LMs) become increasingly capable of writing and executing code, their potential for "dual-use" in cybersecurity—both for defending systems and launching attacks—has become a major concern for policymakers and researchers. However, existing benchmarks for evaluating these risks are often too simple (targeting high school or university levels), closed-source, or lack the granularity needed to measure incremental progress.

To truly understand the risks and capabilities of LM agents, the community needs a benchmark that features professional-level difficulty and a way to track "partial credit." Without this, evaluations only yield a binary "success or failure," masking how close a model actually got to solving a complex vulnerability.

To address this gap, researchers introduce Cybench, a new open-source benchmark designed to push the limits of LM agents by testing them on 40 professional-level Capture the Flag (CTF) challenges. The study reveals a significant "capability ceiling": while top models can solve tasks that take human experts about 11 minutes, they currently fail to solve more complex vulnerabilities that require deep intuition or hours of human effort.

The Cybench Framework and Methodology

The researchers developed a framework that initializes an LM agent in a Kali Linux environment, a standard toolkit for security professionals.

Cybench Framework Overview

The agent operates in an "act-execute-update" loop:

  1. Act: The model generates a response containing its reflection, plan, thought process, and a specific command.
  2. Execute: The command is run in a Docker container.
  3. Update: The agent observes the output and updates its memory.

A core innovation in Cybench is the introduction of subtasks. For each complex challenge, the authors broke the problem down into intermediary steps (e.g., "Identify the leaked credentials" or "Find the vulnerable operator"). This allows researchers to evaluate model performance even on tasks that are currently too difficult to solve entirely.

The team also experimented with different agent scaffolds—the "interface" through which the model interacts with the system. These included a structured bash interface, a pseudoterminal for interactive sessions, and a web search tool to allow the agent to look up documentation or CVE details.

Dataset Composition

Cybench consists of 40 tasks curated from four recent (2022–2024) professional-level CTF competitions: HackTheBox (Cyber Apocalypse 2024), SekaiCTF, GlacierCTF, and HKCert. The tasks span six categories: Cryptography, Web Security, Reverse Engineering, Forensics, Exploitation (Pwn), and Miscellaneous. To provide an objective measure of difficulty, the authors used First Solve Time (FST)—the actual time it took the fastest human team to solve the challenge during the original competition.

Key Results and Insights

Evaluating 8 state-of-the-art models revealed a stark contrast between mechanical execution and analytical problem-solving.

Model Performance on Cybench
  • Top Performers: Claude 3.5 Sonnet and GPT-4o led the pack. Claude 3.5 Sonnet achieved the highest unguided success rate (17.5%), while OpenAI o1-preview showed the strongest performance on subtasks (46.8%).
  • The 11-Minute Wall: There is a sharp drop-off in model performance based on human solve time. Models had a high success rate on tasks humans solved in under 11 minutes but failed almost entirely on anything harder. This suggests models are currently good at "mechanical" security tasks but lack the "creative leap" required for more obscure vulnerabilities.
  • The Difficulty Gap: The most difficult task in the set took human teams nearly 25 hours to solve. No model came close to solving these "marathon" tasks, highlighting a massive gap between current AI capabilities and elite human hackers.
  • Scaffolding is Model-Dependent: Interestingly, more "expressive" tools didn't always help. Claude 3.5 Sonnet performed better when given a pseudoterminal, but GPT-4o actually performed worse, struggling with the added complexity of managing terminal states (like remembering to append newline characters).
  • Safety Refusals: Refusals based on "ethical concerns" were rare but did occur, primarily with Claude 3 Opus and 3.5 Sonnet, even when the prompt explicitly stated the model was acting as a security expert in a controlled challenge.

Limitations and Future Work

The authors highlight several limitations to the current benchmark:

  1. Small Codebases: CTF tasks usually involve hundreds of lines of code, whereas real-world enterprise systems involve millions.
  2. Short Time Horizons: CTFs are designed to be solved in days; real-world persistent threats may take months.
  3. Tool Constraints: The agents did not have access to specialized heavyweight security tools like decompilers (e.g., Ghidra) or advanced debuggers, which might be necessary for the harder tasks.

Future work will focus on expanding the diversity of tasks and exploring more sophisticated agent architectures that can handle longer-term reasoning and more complex toolsets.

Summary updated

BibTeX
@inproceedings{zhang2025cybench,
  author = {Andy K Zhang and Neil Perry and Riya Dulepet and Joey Ji and Celeste Menders and Justin W Lin and Eliot Jones and Gashon Hussein and Samantha Liu and Donovan Julian Jasper and Pura Peetathawatchai and Ari Glenn and Vikram Sivashankar and Daniel Zamoshchin and Leo Glikbarg and Derek Askaryar and Haoxiang Yang and Aolin Zhang and Rishi Alluri and Nathan Tran and Rinnara Sangpisit and Kenny O Oseleononmen and Dan Boneh and Daniel E. Ho and Percy Liang},
  title = {{Cybench: A Framework for Evaluating Cybersecurity Capabilities and Risks of Language Models}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=tc90LV0yRL},
}
Figure