PatchBench: Evaluating AI Agents for Vulnerability Patching
Chihao Shen, Jiacheng Li, Aastha Mahajan, Jeffery Siyuan Tian, Yonghwi Kwon, Yizheng Chen
Abstract
AI agents have recently demonstrated strong performance in automated vulnerability patching. However, existing evaluations often validate a patch only by testing whether the provided Proof-of-Concept (PoC) input still triggers a crash. This leaves two key threats to validity: agents may reproduce memorized historical developer patches, or they may generate surface-level fixes that only suppress the reported crash. We study these concerns for C/C++ vulnerability patching. We introduce a patch similarity metric to detect memorized patches. On average, 25% of the agent patches exhibit substantial similarity to historical developer patches, indicating that patch memorization is a real threat to the validity of vulnerability patching evaluations. Meanwhile, agents also frequently exploit benchmark structures to pass patch validation by patching on the crash stack trace to suppress the crash, rather than localizing and fixing the root cause of the vulnerabilities. To handle these issues, we propose PatchBench, a new benchmark for evaluating AI agents on realistic vulnerability patching tasks. PatchBench selects vulnerabilities whose ground-truth fixes lie outside the crash stack and uses vulnerability transplant and code mutations to migrate historical vulnerabilities into new repository contexts, reducing the risks of surface-level fixes and patch memorization. We develop new patch validation methods that thoroughly evaluate both security and semantic correctness of agent patches. Across 11 state-of-the-art agents, including the top three AIxCC agents, the original PoC-only validation inflates the patching task solve rate of agents by 1.83 on average. Our results reveal key limitations of current patching agents and point to future research directions for more reliable vulnerability repair.
Create a lesson
Metadata
- Categories
- cs.CR, cs.AI, cs.SE
Related papers
Now You See It, Now You Don't: Manipulating Perception and Attention in Code Vulnerability Detection LLM Agents
Shared title terminologycs.CRShanquan Yang, Boyu Kuang, Chunyi Zhou et al.
Controlled Autonomy for Agentic AI: A Layer-by-Layer Evaluation of Policy Enforcement, Cryptographic Identity and Isolation
Shared title terminologycs.CRHisham Ali, Vasileios Mavroeidis, Nikolaos Pitropakis et al.
Abliterated, but Better? Paired Evaluations of Cybersecurity Agents
Shared title terminologycs.CRAlan Zabihi, Ismail Pelaseyed
An Experimental Evaluation of Multimodal Prompt Injection Attacks on Agentic AI Frameworks
Shared title terminologycs.CRViet K. Nguyen, Mohammad I. Husain
VEX-Bench: Benchmarking LLM Agents for Assessing Exploitability of Software Supply Chain Vulnerabilities
Shared title terminologycs.CRJiahao Shi, Edward Tsien, Yifeng Di et al.
AgentHijack: Visual Patch Attacks on Multimodal Computer-Use Agents
Shared title terminologycs.CRZhihao Liu, Hongyu Sun, Zhiyuan Fu et al.