LLM Agents can Autonomously Exploit One-day Vulnerabilities

Richard Fang, Rohan Bindu, Akul Gupta, Daniel KangarXiv 2024 · DOI

Introduction

While Large Language Models (LLMs) have demonstrated significant potential in software engineering and scientific reasoning, their application in autonomous cybersecurity exploitation has remained largely speculative. Previous research has primarily focused on "human uplift"—where LLMs assist human experts—or "Capture The Flag" (CTF) exercises. However, CTFs are controlled environments that do not fully capture the complexity of production software. This paper investigates whether LLM agents can autonomously exploit "one-day" vulnerabilities: real-world security flaws that have been disclosed but remain unpatched in target systems.

Methodology: The LLM CVE Agent

The researchers developed a specialized agent using the ReAct (Reasoning + Acting) framework. Despite its capabilities, the agent's core logic is implemented in just 91 lines of Python code. The agent is equipped with a suite of tools including web browsing, terminal access, web search, file editing, and a code interpreter.

The LLM CVE agent architecture, illustrating the interaction between the model, tools, and the target environment.

The agent operates in a loop: it receives a CVE (Common Vulnerabilities and Exposures) description, reasons about the current state, selects a tool, observes the output, and iterates until the exploit is successful or a limit is reached. A critical component of the methodology is the prompt (over 1,000 tokens), which encourages creative problem-solving and persistence.

Experimental Setup and Benchmark

To evaluate the agent, the authors introduced a benchmark of 15 real-world one-day vulnerabilities. This dataset spans diverse software, including WordPress plugins, container runtimes (runc), and scientific Python packages (Astrophy). Notably, 11 of the 15 vulnerabilities were disclosed after GPT-4’s training cutoff, ensuring the model could not rely on memorized solutions. The benchmark also includes several "high" and "critical" severity flaws.

The study compared GPT-4 against GPT-3.5, eight open-source models (e.g., Llama-2, Mixtral), and standard vulnerability scanners like ZAP and Metasploit.

Key Results and Performance Analysis

The experimental results reveal a stark performance gap between frontier models and their contemporaries. GPT-4 achieved an 87% success rate (pass@5) when provided with CVE descriptions. In contrast, every other model tested—including GPT-3.5 and high-performing open-source models—failed to exploit a single vulnerability.

Comparison of success rates across different LLM models, highlighting GPT-4's unique capability in autonomous exploitation.

The "CVE Catalyst"

A pivotal finding is the role of the CVE description. When provided with the description, GPT-4's success rate is 87%. Without it, the success rate drops to 7%, and the model identifies the correct vulnerability in only 33.3% of cases. This suggests that while GPT-4 is highly proficient at executing exploits, it still faces challenges in the initial discovery phase of vulnerability research.

Economic Implications

The study also highlights the changing economics of cyberattacks. The authors estimate the cost of a successful GPT-4 exploit at approximately $8.80. This is roughly 2.8 times cheaper than the estimated $25 cost for 30 minutes of a human expert's time. Furthermore, LLM agents offer infinite scalability compared to human labor.

Discussion and Limitations

Despite the high success rate, several bottlenecks remain. Complex web applications relying heavily on JavaScript for navigation proved difficult for the agent's simple browser tool. Additionally, language barriers (e.g., descriptions in non-English languages) and context window limits—where large HTML outputs cause the model to lose track of previous steps—presented significant hurdles.

Future improvements may involve multi-agent architectures, where a "manager" agent handles high-level planning while specialized "worker" agents execute specific tasks.

Conclusion

This research demonstrates that frontier LLMs like GPT-4 possess emergent capabilities for autonomous exploitation of real-world vulnerabilities. As the barrier to entry for sophisticated cyberattacks lowers, the cybersecurity community must prioritize defensive measures and consider the implications of highly capable, scalable autonomous agents.

Summary updated

BibTeX
@misc{fang2024llm,
  author = {Richard Fang and Rohan Bindu and Akul Gupta and Daniel Kang},
  title = {{LLM Agents can Autonomously Exploit One-day Vulnerabilities}},
  year = {2024},
  eprint = {2404.08144},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2404.08144},
}
Figure