Skip to content

PatchBench: Evaluating AI Agents for Vulnerability Patching

Sep 2026 · 0 citations · 71 references
Computer Science

TL;DR

A patch similarity metric is introduced to detect memorized patches and new patch validation methods are developed that thoroughly evaluate both security and semantic correctness of agent patches for vulnerability patching.

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$\times$ on average. Our results reveal key limitations of current patching agents and point to future research directions for more reliable vulnerability repair.

View source

Similar papers

Preprint Sep 2026

SkillSecurer: Detecting and Patching Prompt-Injection Vulnerabilities in AI Agent Skills

The results show that context-aware LLM analysis can provide reliable injection localisation and actionable remediation beyond skill-level flagging alone, and show that context-aware LLM analysis can provide reliable injection localisation and actionable remediation beyond skill-level flagging alone.

Donato Mecca, Alberto Verna, Youness Bouchari et al. · 0 citations
#artificial intelligence Preprint Sep 2026

Vulnerability Localization Benchmark: Measuring Agentic Security Analysis at Repository Scale

VLoc Benchmark results establish vulnerability localization as a distinct repository-scale capability and provide a setting for studying both how security agents search for vulnerable code and when they should refrain from reporting it.

Aman Priyanshu, Supriti Vijay, Kimia Majd et al. · 1 citation · ⚡1
Book Open access Aug 2026

Benchmarking Automated Security Patch Backporting: How Far Are We?

This work presents Porting Benchmark, a curated dataset of 1,234 security patch backporting cases spanning cross-version, cross-branch, and cross-repository scenarios, paired with a common evaluation framework and identifies four root-cause categories (missing target API awareness, cross-version semantic mismatch, non-...

Jin-Cheng Yang, Yu-Long Fu, Cheng-Wei Liu et al. · 1 citation
Open access Oct 2026

A Comprehensive Empirical Analysis of Patch Presence Testing: Capabilities, Limitations, and Paths Forward

Patch presence testing determines whether a binary incorporates the security fixes associated with a known vulnerability and has become increasingly important in software supply-chain security. However, despite numerous proposed techniques, the field still lacks a comprehensive understanding of the practical capabiliti...

Xiao-Bei Zhang, Yao-Wen Zheng, Wu Luo et al. · 0 citations
#artificial intelligence Preprint Sep 2026

SelfOp: An Optimization Algorithm for Self-Improving Security Agents

LLM agents are increasingly used for security tasks: vulnerability discovery, exploit reproduction, and patch generation. Improving them at the model level demands expert demonstrations or computable rewards, which security tasks rarely offer: traces are costly, failures hard to diagnose, rewards sparse, and non-comput...

Saad Ullah, Yiğitcan Kaya, Christopher Kruegel et al. · 0 citations

Related blog posts

Microsoft Research Blog Nov 3, 2026

Learn the rules: The hacker mindset

Research Manager Mike Walker reflects on a career spanning hacker culture, cybersecurity, and AI, sharing lessons about trust, teamwork, leadership, and why solving difficult problems requires curiosity, judgment, agility—and an understanding of the rules. The post Learn the rules: The hacker mindset appeared first on Microsoft Research.

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.