Abstract
SEC-bench is the first fully automated framework designed to evaluate how well LLM agents handle real-world software security tasks, such as generating exploits (PoCs) and fixing vulnerabilities. While LLM agents have made massive strides in general software engineering, security remains a significant challenge. SEC-bench provides a rigorous pipeline for the collection, verification, and evaluation of security vulnerabilities, revealing that even top-tier models fail over 80% of the time on complex, "in-the-wild" security tasks.
Introduction
In the last year, LLM agents have reached impressive milestones in general software engineering, with top models solving over 60% of issues on benchmarks like SWE-bench. However, security engineering remains a "black box." Existing security benchmarks often suffer from being synthetic in nature, highly sensitive to environment configurations, or containing low-quality data (e.g., incorrect "gold patches").
The authors argue that LLM agents cannot be trusted in the software development lifecycle without rigorous, automated verification of their performance on authentic, reproducible security tasks. SEC-bench addresses this by providing a high-quality, reproducible benchmark derived from real-world vulnerabilities.
Methodology
The core of SEC-bench is a pipeline that automates the entire lifecycle of a security task: collection, environment setup, verification, and evaluation.
A standout feature is the SECVERIFIER multi-agent scaffold. Rather than a single agent, it employs a specialized team:
- Manager Agent: Coordinates the workflow and provides feedback.
- Builder Agent: Manages the complex environment requirements of C/C++ projects.
- Exploiter Agent: Analyzes bug reports to create or adapt working Proof-of-Concepts (PoCs).
- Fixer Agent: Synthesizes minimal patches to resolve vulnerabilities.
To ensure objective evaluation, the framework uses memory safety sanitizers (such as AddressSanitizer) as an oracle. A PoC is successful only if it triggers a sanitizer error, and a patch is valid only if that specific error is resolved without breaking the build.
Dataset Construction
The benchmark is derived from the OSV (Open Source Vulnerability) database. Starting from an initial seed of over 38,000 potential instances, the authors produced a final verified dataset of 200 real-world CVE instances across 29 major open-source projects, including PHP, ImageMagick, and GPAC. This automated curation process is highly cost-efficient, costing only $0.87 per instance.
Key Results and Insights
The evaluation of top-tier models like Claude 3.7 Sonnet, GPT-4o, and o3-mini across various scaffolds (SWE-agent, OpenHands, Aider) reveals a massive "security gap" compared to general coding performance.
Major Findings:
- PoC Generation is the Hardest Frontier: Agents struggle significantly more with exploit generation (peaking at an 18.0% success rate) than with patching. This is attributed to the need for precise, byte-level reasoning about memory layouts.
- Vulnerability Patching: Success peaked at approximately 34.0% with Claude 3.7 Sonnet. The most common failure modes were patches that compiled but remained vulnerable, or patches that introduced compilation errors.
- The Debugger Deficit: Trajectory analysis showed that agents spend excessive time reading files but lack dynamic tools like GDB. Without the ability to inspect program state during a crash, agents are effectively "flying blind."
- Multi-Agent Superiority: The SECVERIFIER multi-agent approach outperformed single-agent baselines like CodeAct by 85.7% in verification tasks, proving that modularizing the build, exploit, and fix phases is crucial.
Limitations and Future Work
Currently, SEC-bench focuses on C/C++ due to the reliability of memory sanitizers. Future expansions aim to include memory-safe languages like Java or Python, which will require different verification oracles. Additionally, the benchmark currently centers on memory safety; future iterations will cover logical vulnerabilities, web-based attacks, and cryptographic flaws. Finally, integrating agents with dynamic analysis tools (debuggers and tracers) is a priority for improving agentic reasoning in security contexts.
Summary updated