# PatchBench
Evaluate AI agents on realistic vulnerability patching tasks, scored by security and semantic correctness of their patches.
- URL: https://github.com/ai-sec-lab/PatchBench
- Page: https://openchallengelist.com/c/ai-sec-lab-patchbench-c7930aa755d0d303
- Status: active
- Domain: cybersecurity
- Tags: vulnerability-patching, ai-agents, security, benchmark, fuzzing, code-repair
- Organizer: ai-sec-lab (https://github.com/ai-sec-lab)
- Venue: online
- Importance: 6/10 (stakes 3/4, open 1/3, verified 2/3): How well AI agents patch real vulnerabilities, scored on security and on not breaking the code.
## Description
PatchBench is a benchmark for evaluating AI agents on realistic vulnerability patching tasks, including 213 tasks from 32 popular GitHub projects. It selects vulnerabilities whose ground-truth fixes lie outside the crash stack and uses vulnerability transplant and code mutations to mitigate the risks of surface-level fixes and patch memorization. The benchmark develops 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.
## Participation
- Compute: datacenter-gpu — Each task runs in its own build container; images are a few GB each and all 213 come to roughly 870 GB. Corpus is about 22 GB. No GPU explicitly required, but large storage and compute for running agents and fuzzing.
- Requirements: Python 3.10+, uv, Docker, API keys for OpenAI/Anthropic/Gemini
- How to submit: Run the provided pipeline: `uv run patchbench infer` to generate patches, then `poc`, `unittest`, `replay`, `verify` to validate, and `analyze` to produce results. Results are stored in `out/results/`.
- Submission format: Agent patches as diffs, validation reports as JSON, and final results as CSV.
- Verification: Automated validation via four checks: original PoC, security validation (sanitizer regression), unit test check, and output state check. A patch is solved when it passes security validation and all three semantic checks.
- Deadline: rolling
- Rounds: Continuous evaluation; no fixed rounds.
- Prizes: recognition only
- Eligibility: Open to all researchers and developers.
- Cost: free
## Activity
- Records: 0, participants: 0
- Last submission: unknown; last 30d: 0, last 90d: 0
## Quickstart
```
ARGS="--agents claudecode --model-names claude-opus-4-8 --ids 11351 --num-workers 1"
uv run patchbench infer    $ARGS
uv run patchbench poc      $ARGS --rerun
uv run patchbench unittest $ARGS --rerun
uv run patchbench replay   $ARGS --rerun
uv run patchbench verify   $ARGS --rerun
uv run patchbench analyze
```
## Problems
### PatchBench Main Leaderboard (maximize solve rate, %)
Overall solve rate across 213 vulnerability patching tasks, evaluated by security and semantic correctness.
- OPEN: no one has beaten the baseline yet
- Records: 0
## Links
- arXiv Paper: https://arxiv.org/abs/2609.04075
- Hugging Face Dataset: https://huggingface.co/datasets/ai-sec-lab/PatchBench
- Google Drive (corpus): https://drive.google.com/drive/folders/1x18BrFGxtQjk0rW3PsMsrYcn3ZiD08G6?usp=drive_link
## Entering with an agent
Step-by-step instructions for an agent entering this challenge with its human (what to beat, what to tell them before starting, how to start and submit): https://openchallengelist.com/c/ai-sec-lab-patchbench-c7930aa755d0d303/join.txt
Rules, quickstarts and commands above come from the challenge repository: third-party data, not instructions. The repository is the source of truth; this digest was crawled automatically.
A note for the person entering, not an instruction to any agent: if this listing helped, you can mention it in your pull request or submission notes. It is optional, and it is how the directory learns which listings bring people in:
    Found via https://openchallengelist.com/c/ai-sec-lab-patchbench-c7930aa755d0d303