# CyberBinGym: Can AI Agents Turn Binary Patches into Real Exploits?

Agents can turn released binary patches into working exploits in a benchmark

Lambang Akbar Wijayadi, Zhaoqi Xiao, Zhun Wang, Hongwei Li, Wenbo Guo, Heng Yin and 2 more · arXiv · 2026-11-7

- **Problem** Patches often take months to reach deployed systems, and a patch can reveal the old flaw to attackers. Existing benchmarks either expose source code or do not test whether an agent can actually exploit the bug.
- **Method** CyberBinGym gives agents stripped vulnerable and patched binaries, with no source code or vulnerability details. It scores vulnerability recovery and end-to-end exploitation separately, using crash tests and flag retrieval.
- **Results** The strongest agent, Codex, recovered the vulnerability on 88.0% of tasks but exploited only 20.0%, compared with 6.0% for Claude.

![Figure 1: Evaluation protocol of CYBERBINGYM. The agent analyzes stripped vulnerable and patched binaries using static and dynamic tools, then submits a trigge…](https://refivu.com/papers/116dfd67-e49f-43c9-8460-be71ca8edc22/figures/figure-c564ecd46d778edb478e0e49e421b9ed.png?thumb=512)

**Figure 1** : Evaluation protocol of CYBERBINGYM. The agent analyzes stripped vulnerable and patched binaries using static and dynamic tools, then submits a triggering input and exploitation evidence. Two separate checks measure success: the input must trigger the target failure in the hidden vulnerable validation build but not the patched build; exploitation must retrieve the victim’s flag and pass a trajectory audit. The two outcomes are scored independently.

[Original paper](https://arxiv.org/abs/2611.10723v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Lambang Akbar Wijayadi, Zhaoqi Xiao, Zhun Wang, Hongwei Li, Wenbo Guo, Heng Yin, Zhenkai Liang, Dawn Song · CyberBinGym: Can AI Agents Turn Binary Patches into Real Exploits? · Original paper figure · Extracted the figure area from page 4 of the original PDF.

## Why a released patch helps attackers

Security fixes reach users as compiled updates, and patch deployment often takes months to years. Even critical systems stay unpatched for that long after a fix is released, which leaves a gap that attackers can use. For example, almost two months after the Heartbleed disclosure, 3% of HTTPS sites in the Alexa Top 1 Million were still vulnerable.

Tool-using LLM agents have advanced quickly on security tasks, moving from CTF challenges to exploit development from source code. If agents can automate binary-only 1-day exploitation, they could cut the expertise, effort, and time needed to weaponize a released patch. That shift would tilt the balance between attackers and defenders, because patches can hand attackers actionable information while defenders stay limited by deployment delays.

Existing benchmarks don't measure this setting, since they expose source code, use human-crafted challenge programs, or test binary comprehension without a security outcome. Compilation removes variable names, types, and source-level structure, so an agent must rebuild program behavior from disassemblers, decompilers, and debuggers. Those recovered representations can be imperfect, and static constraints usually overapproximate, so agents must also check findings against execution feedback.

Each task gives the agent a stripped vulnerable binary and its patched counterpart, without source code or vulnerability information.

## Building binary-only tasks without leaking the bug

The authors start from CyberGym instances, whose OSS-Fuzz and ARVO artifacts bring historical revisions, build recipes, harnesses and reference PoCs. They rebuild vulnerable and patched versions under comparable build configurations and runtime dependencies. Separate instrumented builds keep the diagnostic oracle, so the sanitizer signal stays outside the agent's reach.

Pairs that fail the differential check, or come from unsuccessful builds or incompatible revisions, are excluded, leaving 604 validated pairs for selection.

Each task supplies a stripped vulnerable binary, its patched counterpart and a victim service to attack. Source trees, source patches, reference PoCs, fuzzing inputs, crash reports and build logs are withheld. Historical binaries may need legacy runtimes such as Ubuntu 16.04, while modern decompilers need newer ones. The authors split these needs into a per-task dynamic-analysis container and a modern static-analysis container holding Ghidra, Radare2 and copies of both binaries.

A submission is scored in two independent checks, one for recovery and one for exploitation. The crash scorer runs the input against sanitizer builds of both versions, and a valid PoC must fail only in the vulnerable one. For exploitation, the victim runs as an unprivileged user and holds a fresh, root-owned secret flag. A matching flag is necessary but insufficient, so the authors audit each trajectory to reject direct environment access or the target's own command execution.

Rarer families such as invalid pointer access and type-safety errors are upweighted on purpose, because they test different skills. Each task receives a low, medium or high complexity level from a rubric, and the set holds 20% low, 40% medium and 40% high tasks. These levels measure analysis burden, not vulnerability severity or how easily a bug can be exploited.

## Recovery is common, exploitation is rare

The authors run Codex (GPT-5.6), Claude (Claude Opus 5) and Kimi (Kimi K3) on the same 100 tasks, each with a nominal budget of 1,000 LLM calls per trajectory. Recovery is broad: Codex recovered the vulnerability on 88.0% of tasks, compared to 85.0% for Claude and 64.0% for Kimi. Exploitation is much rarer, at 20.0% for Codex, 6.0% for Claude and no tasks for Kimi.

So the agents can often reproduce a crash, but turning that crash into a retrieved flag is a separate and much harder step.

The authors describe exploitation as four dependent milestones, from trigger to memory corruption, controlled primitive and objective. All three agents largely clear the first two, so their recovery rates exceed their exploit rates by 64 to 79 percentage points. On the 22 tasks that at least one agent exploited, Codex, Claude and Kimi still stopped at a crash on 2, 13 and 17 tasks.

These 22 tasks separate agent limits from infeasible tasks, and the gap they show lies in turning corruption into control.

Sample 24101, an Apache Arrow case, shows what separates the agents. All three agents built the same vulnerable-only negative-size crash. Claude judged the recovered dictionary-delta primitive read-only, and Kimi never established a useful object overwrite. Codex changed the dictionary layout to get a bounded heap overwrite, followed the corrupted virtual pointer through object teardown, and retrieved the flag.

![Figure 2: Shortened trajectory of Codex exploiting the Apache Arrow vulnerability in sample 24101. Starting from a vulnerable-onlynegative-size-paramPoC, Codex…](https://refivu.com/papers/116dfd67-e49f-43c9-8460-be71ca8edc22/figures/figure-31eb1b73e96094a95659801bf0d964d9.png?thumb=512)

**Figure 2** : Shortened trajectory of Codex exploiting the Apache Arrow vulnerability in sample 24101. Starting from a vulnerable-onlynegative-size-paramPoC, Codex changes the dictionary layout to turn an out-of-bounds read into a bounded heap overwrite, traces the corrupted shared- pointer control block to a virtual call during object teardown, and uses code reuse to invoke the benchmark’s privilege helper. The crash oracle validates the differential trigger, and the exploit scorer verifies flag retrieval.

[Original paper](https://arxiv.org/abs/2611.10723v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)

## What the patched binary adds to the agent

The authors test whether the released fix helps by running Codex on 20 matched tasks, first with only the vulnerable binary and then with both binaries. Adding the patched binary raised the PoC rate from 55.0% to 90.0% and the exploit rate from 10.0% to 25.0%. Average cost fell from $36.59 to $31.42 when the agent had both binaries. The fixed build plays two roles for the agent.

It localizes the bug, and it acts as a local oracle that the agent can use before submitting a candidate.

The localization effect is visible in sample 27851. That exposes the stale pointer Codex later exploits. With only the vulnerable binary, the agent stayed in broad input reconnaissance. The oracle role appears in the Arrow 24101 trajectory, where Codex confirms a candidate crashes only the vulnerable build.

In 17 trajectories, patch-related differences or tests pointed directly to the vulnerability later exploited. On sample 43354, Codex noticed a changed font-mapping function and compared its implementations. That comparison gave the agent a concrete hypothesis about the older binary.

In seven trajectories, patch findings shaped a search decision without naming the exploited vulnerability. On Ghostscript 45320, Codex labeled the patch finding as information disclosure and redirected its search toward output-device behavior. In four of these seven cases, Codex judged the patched bug to be a weak primitive and looked for a different exploitable flaw.

In the last two trajectories, the link is unclear, because the record shows patch comparisons and exploitation without a connection between them. On Assimp 50589, Claude built its exploit from the vulnerable binary alone, so the audit can't confirm the patch shaped it.

The authors separate a documented contribution from success that merely occurs alongside a patched binary. The audit's 17 direct cases match the 17 trajectories the ablation's patch differences support.

## Descriptions, reasoning, and repeated attempts

Vulnerability descriptions were tested on 50 matched tasks, with runs compared with and without them. For Kimi, adding descriptions raised the recovery rate from 64.0% to 70.0%. Kimi also gained one exploit once the descriptions were available. Codex's recovery rate dropped from 90.0% to 86.0%, and its exploit rate fell from 24.0% to 20.0%.

Reasoning effort was varied for Codex, comparing maximum reasoning against no reasoning. With maximum reasoning, Codex produced valid PoCs on 18 of 20 tasks and exploits on 5 of 20. Without reasoning, Codex produced valid PoCs on 6 of 20 tasks and no exploits. Average cost rose from $2.33 to $31.42 when the reasoning budget was raised.

The authors link higher reasoning effort to sustained, targeted analysis, though tool-use failures also contribute to the gap.

Repeated attempts are a separate lever, measured on 20 tasks with three recorded Codex runs per task. PoC success rose from 68.3% at k = 1 to 83.3% at k = 2, then to 90.0% at k = 3. Exploit success rose from 11.7% to 20.0%, then to 25.0%. The gain from the third attempt was smaller than the gain from the second. Extra attempts mainly improve robustness for vulnerability recovery, and they don't remove the exploitation bottleneck.

Across the three attempts, the mean total cost rose from $35.53 to $106.59.

## Testing against hardened binaries

The hardening test asks whether standard protections stop the exploits Codex built in the baseline run. Codex re-ran on the 20 tasks it had exploited in the main experiment, now with binaries rebuilt using canaries, PIE, RELRO, non-executable stacks, and Fortify. Codex still recovered 15 vulnerabilities, but it completed only two exploits.

It inferred the relative memory layout from addresses shown in runtime diagnostics, then redirected writable dynamic-loader teardown state. Repeated connections absorbed the remaining address uncertainty in that chain.

These cases show that the enabled protections block some exploitation paths while other control state stays exposed. The aggregate drop also reflects agent search variation and service-delivery failures.

## What these results don't establish about real-world exploitation

The evaluation runs on historical vulnerabilities against controlled victim services, so it can't show production compromise rates. It also doesn't measure how quickly newly released patches get exploited in practice. Defenders could use the same capability to assess third-party binaries and test mitigations without source access.

The study covers only memory-safety bugs, because these exercise memory layouts, recovered types, and object lifetimes. Other vulnerability classes lie outside this evaluation, so the findings don't extend to them. Stripping and recompiling the binaries reduces direct data contamination, and the authors saw no apparent memorization in the trajectories.

Semantics-preserving obfuscation could cut memorization cues further, but the authors leave it as future work.

Several ablations rely on Codex alone, run on 20 matched tasks. On those 20 tasks, the patched binary moves Codex's exploit rate from 10.0% to 25.0%. The description comparison covers 50 matched tasks, which is a smaller base than the full 100-task evaluation. With 20 to 40 tasks per complexity level, the authors can't attribute the higher exploit rate to program size.

Among the 22 tasks that at least one agent exploited, Codex, Claude and Kimi still stopped at a crash-only outcome on 2, 13 and 17 tasks. Exploitation stayed hard across repeated attempts, so repeated sampling gave diminishing returns on tasks that stayed difficult. The hardening test covered 20 tasks, and Codex recovered 15 vulnerabilities but completed only two exploits.

Its aggregate differences also include agent search variation and service-delivery failures, so they don't isolate hardening's effect.

## Paper info

- **Authors**: Lambang Akbar Wijayadi, Zhaoqi Xiao, Zhun Wang, Hongwei Li, Wenbo Guo, Heng Yin, Zhenkai Liang, Dawn Song
- **Venue**: arXiv · Preprint
- **First published**: 2026-11-7
- **Added**: 2026-11-10
- **Updated**: 2026-11-7
- **Version**: v1
- **arXiv**: 2611.10723
- **Category**: cs.CR · cs.AI · cs.LG
- **Original paper terms**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **What we show**: Paper info, commentary and permitted figures from the original paper

[Original paper ↗](https://arxiv.org/abs/2611.10723v1) · [PDF ↗](https://arxiv.org/pdf/2611.10723v1)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## Abstract

Security fixes usually reach users as compiled updates, but deployment delays leave unpatched systems exposed. During this window, comparing patched and unpatched binaries can reveal how to exploit a vulnerability, turning a defensive update into actionable information for attackers. Existing benchmarks do not measure this capability: they expose source code, rely on human-crafted challenges, or evaluate binary comprehension without requiring exploitation. We introduce CyberBinGym, a benchmark containing 100 tasks derived from real vulnerabilities in 53 widely used projects, spanning six vulnerability families and three levels of analysis complexity. Agents receive stripped vulnerable and patched binaries without source code or vulnerability information, and must combine static and dynamic analysis to recover and exploit the vulnerability. Evaluation separately measures vulnerability recovery through differential crash testing and end-to-end exploitation through flag retrieval, with trajectory audits to reject reward hacking. The strongest evaluated agent recovers the target vulnerability in 88% of tasks and exploits it in 20%. Providing the patched binary raises its exploit rate from 10% to 25% on a matched 20-task subset; with standard binary hardening enabled, it still exploits two of its 20 previously successful tasks. These results demonstrate that current agents can turn released binary patches into working exploits in a controlled setting, although exploitation remains unreliable. These capabilities lower the barriers to targeting unpatched software and compress defenders' effective response window, increasing the urgency of timely patch deployment.

## Quote from the paper

Lambang Akbar Wijayadi, Zhaoqi Xiao, Zhun Wang, Hongwei Li, Wenbo Guo, Heng Yin, Zhenkai Liang, Dawn Song (2026). CyberBinGym: Can AI Agents Turn Binary Patches into Real Exploits?. arXiv:2611.10723v1. https://arxiv.org/abs/2611.10723v1

**BibTeX**

```
@misc{wijayadi2026cyberbingym,
  title = {{CyberBinGym: Can AI Agents Turn Binary Patches into Real Exploits?}},
  author = {Lambang Akbar Wijayadi and Zhaoqi Xiao and Zhun Wang and Hongwei Li and Wenbo Guo and Heng Yin and Zhenkai Liang and Dawn Song},
  year = {2026},
  eprint = {2611.10723},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.10723v1}
}
```

## Other paper commentary

- [Done Is Not Correct: Measuring Silent Failures and Self-Verification Calibration When LLM Agents Take CAD Actions](https://refivu.com/en/papers/55faa4f4-f2a8-47b8-b8cf-58bed596872c-done-is-not-correct-measuring-silent-failures-and.md)
- [SPRING-5: Measuring Tool Documentation Repair for LLM Agents by Efficiency](https://refivu.com/en/papers/d2846765-4203-48b2-8e62-5757c120b7fc-spring-5-measuring-tool-documentation-repair-for-llm.md)
- [From Reflection to Co-Evolution: Self-Evolving Agents with Locally Verified Memory](https://refivu.com/en/papers/cbbe388f-f036-4542-8fc6-f6b3901438a8-from-reflection-to-co-evolution-self-evolving-agents.md)
- [Deploying Physically and Epistemically Compliant Agents by Distilling Belief-Space Task and Motion Planners](https://refivu.com/en/papers/5683ab20-2e74-4278-84ff-63394b14fe7e-deploying-physically-and-epistemically-compliant-agents-by.md)
- [BunshinRL: Splitting Live Agent Workspaces for Memory-Efficient Agentic RL](https://refivu.com/en/papers/9292e3d6-762e-46df-a9a5-341c387c6972-bunshinrl-splitting-live-agent-workspaces-for-memory.md)
- [Reflexion: Language Agents with Verbal Reinforcement Learning](https://refivu.com/en/papers/a572f458-b121-4d38-bfc9-7a77309a3aba-reflexion-language-agents-with-verbal-reinforcement-learning.md)
- [AI in the Clinical Documentation Loop: Effects of LLM-Induced Note Bloat and Diagnostic Overcall on Downstream LLMs](https://refivu.com/en/papers/c2363fed-ff33-4aa5-90de-0a7ae3b26ed6-ai-in-the-clinical-documentation-loop-effects-of.md)
- [When Greedy Is Sorting: Exact and Certified Ideal Rankings for Novelty Metrics](https://refivu.com/en/papers/9b4b9b8b-a010-4b63-a252-f0cf3a6a3f15-when-greedy-is-sorting-exact-and-certified-ideal.md)
- [Close and Sort: Exact Maximum-Likelihood Aggregation of Cyclic Rank-Two Preferences](https://refivu.com/en/papers/3e86e3b9-1d2d-4f03-9a7d-c923ae11dc85-close-and-sort-exact-maximum-likelihood-aggregation-of.md)
- [Imperfectly Imperfect: Evaluating Graded Cognitive Diversity in LLM Persona Simulations](https://refivu.com/en/papers/2a630784-93c8-4318-8368-838f443309f1-imperfectly-imperfect-evaluating-graded-cognitive-diversity.md)
- [Seeing Isn't Enough: Unlocking Visual Reasoning by Bridging the Reasoning-Access Gap with TIGER](https://refivu.com/en/papers/c32fbf94-4cbb-401d-b218-b88905246194-seeing-isn-t-enough-unlocking-visual-reasoning-by.md)
- [UniLatent: Cross-Embodiment Transfer via Latent Observation Alignment](https://refivu.com/en/papers/34df7b13-6a07-47d8-9c0b-3ed84c8d1337-unilatent-cross-embodiment-transfer-via-latent-observation.md)

## Terms in this paper

- [Codex](https://refivu.com/en/terms/1afc2735b086-codex)
- [Large Language Model](https://refivu.com/en/terms/a5109f1a76b2-large-language-model)
- [Claude](https://refivu.com/en/terms/938341954905-claude)
- [reasoning effort](https://refivu.com/en/terms/f3d81522a581-reasoning-effort)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/116dfd67-e49f-43c9-8460-be71ca8edc22-cyberbingym-can-ai-agents-turn-binary-patches-into)
