arXiv News

First-hand information for everyone

Site

AboutPrivacy PolicyTerms of Use

© 2026 arXiv News

Adversarial agents reveal many “fixed” vulnerabilities still open, paper shows | arXiv News

arXiv News

EnglishJapanese

Switch language

EnglishJapanese
Loading account…

First-hand information for everyone

Back to front page
CryptographyEnglishPublished

Adversarial agents reveal many “fixed” vulnerabilities still open, paper shows

October 16, 2026arXiv: 2610.20245v1

Automated program repair systems that use large language models (LLMs) to patch software vulnerabilities are gaining traction — but a new study warns that common validation practices can give a false sense of security. Researchers behind a system called P2Patch show that a patch which appears to block a single observed exploit often remains vulnerable to a distinct but related exploit unless it is stress-tested adversarially.

The problem starts with how repair systems are typically judged. Many methods take a single piece of evidence — a static analyzer report, a crashing input, a sanitizer trace, or a published proof-of-concept (PoC) — and both use it to make a patch and to decide whether the patch worked. That creates an “oracle reuse” risk: a patch that merely defeats the example used to build it can still leave the same underlying weakness exploitable in a slightly different way.

P2Patch addresses that gap with a simple adversarial idea. The system runs two agent roles in a loop: an “exploiter” attempts to turn a normalized vulnerability finding into an executable proof-of-vulnerability (PoV) that reproduces the bug, and a “patcher” modifies the source until that PoV is blocked. Critically, once the patch blocks the initial PoV the exploiter treats the patched program itself as a new target and searches for a distinct same-vulnerability bypass. Any newly confirmed bypass becomes a permanent repair requirement; the patcher must then harden the program against every execution-confirmed PoV accumulated during the process. The protocol’s orchestrator enforces execution-based acceptance (reproduced, blocked, or inconclusive), keeps construction-time evidence separate from held-out evaluation oracles, and replays earlier PoVs against final patches.

Why that separation matters was illustrated by one motivating example in the paper: an archive-extraction “zip slip” fix that tested whether a resolved file path string began with the target directory’s string. That check blocked inputs that climb above the extraction directory with “../…”, but it still allowed entries that produced a sibling path whose characters began with the same prefix. Nine years later, maintainers fixed the issue by canonicalizing paths and checking a directory separator boundary — an attack-path that the initial patch had left open. The paper uses this kind of phenomenon to argue that reproducing a single PoV does not by itself define what a correct, robust patch must cover.

What the authors tested

To measure the effect of adversarial hardening, the team assembled a benchmark called VULNREPAIRBENCH: 101 project–CVE subjects spanning C/C++ and Java, each at a pinned vulnerable revision and supplied with independently curated held-out PoV suites. The held-out suites were intentionally kept blind to the agents; the authors separated two evaluation families:

- Fix-closed PoVs: held-out PoVs that reproduce on the vulnerable revision and are blocked by the official upstream fix. These measure whether an automatically generated patch covers the same attack paths the official fix covered.

- Residual PoVs: held-out PoVs that reproduce on both the vulnerable and the official fixed revisions; these measure whether a generated patch blocks behaviors that the official fix left open.

All repair runs used the same orchestration and build harness and — in the main experiments — the same coding model for patching and exploitation. The team compared three protocol variants: a single-pass repair that never receives an executable PoV; a “PoV-only” variant that bootstraps with a single reproducing PoV but performs no adversarial hardening; and the full P2Patch adversarial loop, which iteratively grows the set of execution-confirmed repair obligations.

Key findings

- Bypasses after “successful” repairs are common. In 41% of runs (41 of 101 subjects), the exploiter found a distinct execution-confirmed bypass after a patch had already blocked the PoV that produced it. In other words, a patch that passed its own construction-time checks was later attacked successfully by a different same-vulnerability PoV.

- Adversarial hardening raises held-out security coverage. Against single-pass repair from the same starting finding, P2Patch raised macro-averaged coverage on the held-out fix-closed suites from 78.1% to 84.7% and on the residual suites from 42.1% to 62.5%. The paper reports that these increases remain statistically detectable under paired tests used in the study. At the path level (micro-coverage), similar improvements were observed.

- The adversarial loop, not just having a live PoV, produces most of the detectable gain. Comparing the PoV-only runs with the full loop showed the biggest incremental benefit came from actively searching the patched program for bypasses and forcing the patcher to incorporate those bypasses into repair obligations. The authors emphasize that the protocol is bounded (a fixed number of hardening rounds in their experiments), so it hardens until the budget is exhausted rather than proving absence of vulnerability.

- The result is not an artifact of a single model. The full adversarial protocol was tried with several different model families. All produced runs in which a patched program could be bypassed and all benefited from adversarial hardening, although absolute performance and cost varied across models.

Caveats and limitations

The authors are careful to frame P2Patch as a practical hardening protocol, not a formal verifier.

- Bound on completeness: the exploiter is a bounded, imperfect searcher rather than a complete verifier. A “no additional bypass found” result therefore means the configured search failed — not that none exists. The paper treats the protocol as a way to grow executable requirements, with final security judged by held-out suites that were never shown to agents.

- Infrastructure needs: the approach requires a build-and-test environment able to execute PoVs reliably; inconclusive execution (build failures, missing harnesses, timeouts) is treated as neither proof of vulnerability nor proof of repair. The orchestrator rejects pat-ches that simply delete test assets or harnesses instead of fixing code.

- Manual review and quality gates: patches that passed the automated gates were then subject to manual review for unwanted functional or security changes; some candidate patches are rejected at this stage in real runs. That human step is part of the conservative acceptance rule the authors used.

- Model-dependent cost and yield: different model families varied in how often they produced accepted repairs and in the number of bypasses found, and total monetary/compute cost differed across models. The adversarial loop increases runtime and resource usage relative to a single-pass repair.

Why this matters

The paper’s core message is methodological: automated repair pipelines for security should avoid validating patches solely against the evidence that produced them. Adversarial testing — in this case, treating each newly patched program as a fresh attack target and demanding that every confirmed bypass become a permanent repair requirement — surfaces classes of incomplete fixes that one-shot validation misses. Keeping construction-time evidence separate from held-out evaluation oracles is an important control to avoid overestimating repair correctness.

Practical implications include integrating adversarial testing into program-repair workflows, improving benchmark design so held-out attack paths are available for independent scoring, and making sure CI and code-review processes consider attack-path diversity rather than only reproducing a single PoC.

Outlook and open questions

P2Patch is an experimental step toward more robust automated vulnerability repair, not a final answer. Important next questions include how to scale adversarial loops across larger projects, how to automate or better quantify the human review step, how different exploit-generation strategies change coverage, and whether stronger verifiers (static analysis / symbolic methods) can be combined with bounded adversarial search to reduce the remaining blind spots.

The authors report releasing their benchmark (VULNREPAIRBENCH) and orchestration artifacts to support further research. Their results highlight that, for security-critical patches, more independent and adversarial evaluation is essential: stopping validation after the PoV that produced a patch is often not enough.

Source paper

P2Patch: Exploit-Guided Vulnerability Repair

CryptographyArtificial IntelligenceSoftware Engineering
View on arXiv