Manuscript Offprint

arXiv:2610.10150

On the Reliability of LLM-Based Vulnerability Patching Benchmarks

Dang K Le, Wenxuan Shi, Xinyu Xing

Abstract

Large language models (LLMs) have shown remarkable potential for automated vulnerability patching, with benchmarks such as SWE-bench driving rapid progress. However, through extensive experience developing, running, and stress-testing such evaluation frameworks, we identify critical but under-examined pitfalls in current benchmarking practices that can substantially distort reported results. These pitfalls span three dimensions: (1) agent-level factors, where prompting strategies, tool availability, and detailed instructions inflate success rates noticeably without improving developer-aligned patch quality; (2) framework-level factors, where permission misconfigurations, infrastructural bugs, and timeout issues silently degrade or artificially boost agent performance; and (3) dataset-level factors, where reliance on bug reports and single proof-of-concept (PoC) tests fails to capture whether patches address root causes or adhere to developer design intent. To demonstrate the effects of these shortcomings, we curate a dataset of 112 real-world historical bugs across 84 open-source C/C++, Go, and Rust projects, each equipped with PoC tests, regression tests, and added developer's tests that evaluate whether generated patches align with the original developers' design principles. Through three controlled experiments and multiple case studies, we demonstrate that while LLMs can achieve high PoC passing rates in ideal scenarios, many factors in executing a benchmark can noticeably lower the success rate. Moreover, their developer's test passing rates remain low and improve only marginally with newer models, revealing that models are increasingly adept at suppressing symptoms but not at producing patches that satisfy upstream developer-authored tests. Our results show that current benchmark scores are highly sensitive to evaluation design choices, and we provide practical guidelines for making future evaluations more rigorous, reliable, and reproducible.

1 Introduction

Automated program repair (APR) with large language models (LLMs) has progressed from synthetic code-completion tasks [34] to end-to-end agents that localize, patch, and validate fixes against real-world software projects [42,49]. Benchmarks such as SWE-bench [20] and its multi-language successors [22,31,48] have become the de facto yardstick [30]: a new model is judged by the fraction of issues it “resolves,” [25] and leaderboards are updated weekly. This enthusiasm has spawned a vibrant ecosystem of agent frameworks, fine-tuned models, and training datasets derived from benchmark traces [29,45].

Unfortunately, the same ecosystem is remarkably opaque about how those numbers are produced. A typical benchmark run places an agent in a buggy repository with a bug report, exposes some set of tools and auxiliary artifacts, and scores the resulting patch against one or more automated oracles. Seemingly small choices, such as whether the harness tells the agent how to build the project, or whether the target's git history is included in the workspace, can significantly affect the reported pass rate. Worse, an agent can “pass” a benchmark case by silencing the symptom used to score it while leaving the underlying defect, or even the whole codebase, demonstrably worse off [39]. If these results are then used to train the next generation of code models, the pitfalls are baked into model weights [43].

In this paper we argue that the benchmarking pipeline itself, not just the model or the dataset, is a first-class research artifact that deserves principled design and critical scrutiny: benchmark scores are highly sensitive to evaluation design and can materially misrepresent model capability. Drawing on our experience developing and stress-testing LLM patching agent harnesses across three languages, we identify a taxonomy of pitfalls along three dimensions: Agent-level factors ( §3.1§3.1): prompting choices, tool permissions, feedback oracles, and auxiliary capabilities such as Internet access; framework-level factors ( §3.2§3.2): permission misconfigurations, timeouts, hidden agent mechanics, and post-agent test interference; and dataset-level factors ( §3.3§3.3): how vulnerabilities are described, whether PoCs are provided, how the source is packaged, and how “success” is operationalized.

To study these factors empirically, we curate 112 historical bugs across 84 C/C++, Go, and Rust projects, each packaged in a reproducible Docker harness (§4) with PoCs, regression tests, and developer's tests (§4.2)—tests that encode the developer's design intent, not just the absence of a crash. We then run three controlled experiments and five case studies to probe how each factor shifts apparent patch quality (§5, §6).

Our experiments are designed to isolate principles rather than individual knobs. For example, across a modern frontier model, we observe that detailed build and test instructions lift PoC-pass rates by a large margin in C/C++ and much less so in Go/Rust—because in Go/Rust the build system is uniform and discoverable from the repository, whereas C/C++ projects' build systems are heterogeneous. This illustrates one of the principles we demonstrate in this paper: the reported success rate of a benchmark is only meaningful relative to the information its harness makes available to the agent. We generalize this style of observation into a set of guidelines (§8) for how benchmarks should be built and reported.

Contributions. We make the following contributions: (1) A three-level taxonomy of pitfalls in LLM vulnerability patching benchmarks, grounded in concrete failures we observed in practice. (2) A controlled evaluation dataset and harness designed to isolate benchmarking factors: 112 real-world security-relevant bugs across three languages, each packaged with reproducible builds, PoCs, regression tests, and developer's tests derived from upstream commits. (3) Three controlled experiments quantifying how prompting, tool availability, PoC access, and model choice move both PoC-pass and developer-test-pass rates; and five case studies that show how "incidental" framework issues can silently dominate headline numbers. (4) A survey of 13 existing real-world patching benchmarks and vulnerability datasets along the same factor axes, showing that most exhibit at least one of the pitfalls we characterize. (5) A set of concrete guidelines and a reporting checklist for future benchmark designers.

Scope. This work is not intended to propose another benchmark for model ranking. Instead, the dataset is deliberately designed to highlight evaluation pitfalls under controlled conditions rather than to support competitive comparison. Our contribution is methodological: to strengthen the validity, interpretability, and reproducibility of reported APR results and of the training signals subsequently derived from them.

References (39)