TL;DR
Researchers have introduced SecTest-Eval, a new benchmark designed to test how well Large Language Models (LLMs) can generate exploits when given direct access to a vulnerable function. While LLMs struggle with "global" exploits (finding a path from a program's entry point to a bug), this paper shows they are surprisingly capable at "local" exploitation, though even the best models still fail nearly half the time.
What Problem Does This Paper Address?
In the world of cybersecurity, "exploit generation" is the holy grail. It’s the process of writing code that proves a software bug is actually a dangerous vulnerability. Currently, we evaluate LLMs on this task using "global" benchmarks—asking the AI to find a way from a program's front door (like a web API) all the way down to a specific buggy function. Unsurprisingly, LLMs are terrible at this, often solving fewer than 18% of tasks.
To better understand what LLMs can do, researchers have started breaking this massive problem into smaller pieces. One key piece is "local" exploitation: if you are already at the buggy function, can you write the specific payload needed to trigger a security failure?
The problem is that existing datasets for this "local" view are notoriously inaccurate. One popular dataset, Devign, was recently found to have a label accuracy of only 24%. If the "ground truth" is wrong, we can't trust the evaluation. SecTest-Eval aims to fix this by providing a high-accuracy, automated benchmark for local exploit generation.
Methods
The authors developed a two-part system to create a more reliable benchmark:
- Automated High-Accuracy Labeling: Instead of relying on messy commit histories, they used a "multi-LLM collaborative framework." They tasked three top-tier models (GPT-4, Claude, and Gemini) to identify "sensitive operations" within a function—code that could actually lead to a crash or data leak. A function is only labeled as vulnerable if at least two models agree, and the results were further verified by human experts.
- The Sandbox & Oracles: To evaluate the LLM's output, they built a Docker-based sandbox. They defined three specific "Security Impacts" and created automated "test oracles" to check for them:
- Unauthorized Data Reading (UDR): Did the exploit print out a secret file?
- Unauthorized Data Modification (UDM): Did the exploit change or delete a target file?
- Denial of Service (DoS): Did the program crash or hang for more than 15 seconds?
Datasets
The benchmark, SecTest-Eval, consists of:
- 203 task instances derived from 79 different open-source C/C++ projects (including heavyweights like the Linux kernel and TensorFlow).
- 14 distinct weakness types (CWEs), ranging from classic buffer overflows to complex logic errors.
- The data is intentionally balanced, with roughly one-third of the tasks dedicated to each of the three security impacts (UDR, UDM, DoS).
Key Insights and Ideas
- Local vs. Global: LLMs are much better at exploitation than we thought—provided we narrow the scope. The jump from 18% success on global tasks to 56% on local tasks suggests that the "reasoning" required to navigate a codebase is a bigger bottleneck than the "creativity" required to write a payload.
- The CoT Paradox: Interestingly, Chain-of-Thought (CoT) prompting didn't help. While CoT is a "magic button" for math and general coding, it actually decreased performance for some models in security tasks. The authors suggest that the reasoning patterns for exploits are fundamentally different from standard software engineering.
- Generalists Beat Specialists: General-purpose models like GPT-4 and Claude-4 outperformed code-specific models like Qwen3-Coder. This suggests that "security reasoning" might rely more on broad world knowledge and logic than on just seeing millions of lines of code.
- One Bug, Many Faces: A single vulnerable function can often be exploited in multiple ways (e.g., both a crash and a data leak). However, the researchers found that if a model successfully generated a DoS exploit, it only had a 24% chance of successfully generating a UDR exploit for the same function. Security capability is not a monolith.
Key Results
- GPT-4.1 emerged as the top performer with a 56% overall success rate.
- Agent Integration: When LLMs were wrapped in "agents" (tools that allow the AI to run code and see errors), performance improved by 7.5%.
- Impact Difficulty: Unauthorized Data Modification (UDM) proved to be the hardest impact to trigger, with some models (like Gemini-2.5) hitting as low as a 7.46% success rate in certain configurations.
- Failure Modes: The most common reason for failure (up to 85% of cases) was "No Triggering Impact"—meaning the code compiled and ran, but the "payload" simply wasn't clever enough to break the security boundary.
Limitations and Future Work
The authors acknowledge several constraints:
- Language Support: The current benchmark is limited to C/C++.
- Single-Function Scope: It only looks at vulnerabilities contained within a single function, ignoring complex bugs that span multiple files or modules.
- Tooling: Current security agents (like Enigma) are mostly designed for "penetration testing" (port scanning, etc.) rather than the precise code-level manipulation needed for local exploits.
Future work will focus on expanding to other languages and developing automated methods to identify multi-function vulnerabilities.
Summary updated