arXiv:2609.06229cs.SESep 2026

Manuscript Offprint

arXiv:2609.06229

SWE-Test: Benchmarking LLM Vulnerability Discovery via Input Prediction

Yuanxiang Shi, Jiayi Lin, Xuanyong Lin, Liangcai Su, Yeheng Duan, Wei Wang, Qi Han, Bing Zhao, Wei Hu, Xander Xu, Chenxiong Qian

Abstract

Vulnerability discovery is becoming an important ability of large language model (LLM) agents: agents that silently miss real defects leave critical software exposed. Rigorously measuring this ability is therefore urgent, but existing benchmarks are gameable through data contamination, score recall against an unknowable vulnerability set, often rely on synthetic bugs, and report a single end-to-end verdict that cannot localize where an agent fails. Vulnerability discovery is a composite ability: an agent must comprehend source code, infer input constraints, construct inputs, execute them, and iteratively correct from feedback. We recast its measurement as an input-prediction task with a closed, deterministic ground truth: using coverage-guided fuzzing, we mine deep target branches in real-world C/C++ programs and ask an agent to predict an input that drives execution to a given branch. This decomposes discovery into three task modes over 22 real-world C/C++ programs spanning 15 domains. Open-loop and Feedback-enabled share 60 fixed-target task instances across 16 of these codebases (13 domains), testing input construction without and with a distance oracle to isolate code comprehension from feedback-driven correction. Online Arena instead removes the predefined target and scores path exploration by coverage gain on a separate, partially overlapping pool of 11 programs; agents collectively confirmed 13 distinct bugs across six programs. Evaluating 15 default-effort model-scaffold configurations, the best reaches only 55.0% pass rate in the Feedback-enabled mode, and the mean across seven paired Claude Code configurations is 36.4% with feedback versus 19.3% without. Decomposing failures, we find constraint inference, not navigation, is the dominant bottleneck. We release SWE-Test with a turnkey evaluation environment.

Keywords: Vulnerability Discovery, LLM Agents, Fuzzing, Software Testing, Benchmark

1 Introduction

Vulnerability discovery has become one of the defining capabilities of frontier coding agents. In early 2026, an AI agent autonomously uncovered a sixteen-year-old vulnerability in FFmpeg, a media library embedded in countless systems, on a line of code that automated fuzzers had executed more than five million times without ever flagging it, and separately chained several Linux kernel flaws into a privilege-escalation exploit Anthropic (2026a). Anthropic's Frontier Red Team reports that current models can find meaningful zero-day vulnerabilities in well-tested codebases without any specialized harness, adding value on top of the fuzzing infrastructure that security teams have refined for years Anthropic (2026b). As agents move from writing code to auditing it, their capacity to surface security-relevant defects bears directly on the security of the software supply chain, which makes measuring that capacity, rigorously and at scale, an urgent problem.

Unfortunately, existing benchmarks used to measure it rest on assumptions that do not hold for real-world vulnerability discovery. First, security benchmarks built from public records can be gamed: their tasks are absorbed into model training and solved partly from memory. A recent analysis finds that on InterCode-CTF a frontier model has a solution-leakage rate of about 14%, attributed to the benchmark's age and likely presence in the training corpus Peng et al. (2026); newer security benchmarks try to dodge this by using only post-cutoff challenges (CyBench, 2022 to 2024 Zhang et al. (2025b); CVE-Bench, May to June 2024 Zhu et al. (2025)), but that only delays the problem as cutoffs advance. Second, the set of vulnerabilities in a codebase is unknown and cannot be enumerated, so recall against a fixed list of known vulnerabilities is a biased metric. CyberGym, for example, asks the agent to reproduce one specific disclosed vulnerability and credits only that target Wang et al. (2026), so an agent that finds a different genuine defect scores nothing and the reported recall is not a meaningful fraction of an unknowable whole. Third, some benchmarks sidestep these difficulties with synthetic bugs, which are easy to grade but rarely match the constraint structure and cross-procedure depth of real defects.

We observe that vulnerability discovery is a composite ability: an agent must comprehend source code, infer input constraints, construct inputs, execute them, and iteratively correct its approach from feedback. Building on this, we recast the measurement of an agent's vulnerability-discovery ability as an input-prediction task, decomposing it into three underlying abilities: deep code comprehension, feedback-driven correction, and path exploration. To probe the first two, we use fuzzing to mine, from real programs, deep target branches together with the execution paths that reach them, and we ask the agent to generate an input that drives execution to a given branch. Reaching such a branch requires the agent to understand deep code, since the path from the program entry to the target typically spans multiple files and functions, and to reverse-reason from that target back to a satisfying input. Beyond the source, we then add an environment feedback signal that reports the agent's approximate distance to the target, so the agent can continuously adjust its candidate and converge on an input that reaches the branch. Finally, to probe the third ability, we place the agent in a fuzzing process that never stops on its own and turn the single target branch into all branches: the agent now aims to maximize code coverage, with coverage itself serving as the feedback signal, and repeatedly generates new inputs to reach new branches by reasoning over the current coverage and the source. This formulation is hard to game, since the agent must synthesize an input that satisfies a branch identified by line numbers in a specific build, for which there is no public answer to memorize, and it needs no predefined vulnerability list: posed over real programs, it can trigger real bugs.

Building on this design, we introduce SWE-Test, a benchmark with three modes. The Open-loop mode exposes deep code comprehension alone, providing only source and a target branch. The Feedback-enabled mode adds the distance oracle, exercising feedback-driven correction on the same targets. The Online Arena mode removes the target entirely and scores coverage gain under the never-stopping loop above. The Open-loop and Feedback-enabled modes span 13 domains and 16 real-world programs, including language runtimes, parsers, networking, font and text shaping, XML, cryptography, and compilers. In Online Arena, we run agents continuously for 12 hours.

Across 15 default-effort model-scaffold configurations, the best feedback-enabled pass rate is 55.0%. Among the seven Claude Code configurations with 60 valid trials in both modes, feedback raises mean pass rate from 19.3% to 36.4%, target-function reach from 62.6% to 75.2%, and near-to-pass conversion from 30.8% to 48.4%. In Online Arena, the five evaluated configurations produce 18 model-bug detections, or 13 confirmed bugs across six programs after deduplication by upstream issue or fix.

To make these measurements reproducible and easy to adopt, we release SWE-Test with a standardized, Harbor-based turnkey deployment and evaluation environment that provisions the containerized tasks, runs any supported model-scaffold configuration, and reports per-task and aggregate scores.