arXiv(opens in a new tab)cs.SEOct 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2610.05399

Adaptive Code Revision Attacks on AI Pull Request Reviewers

Jingzhi Gong, Jie M. Zhang, Gunel Jahangirova, Meng Wang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

JINGZHI GONG, King's College London, United Kingdom

JIE M. ZHANG, King's College London, United Kingdom

GUNEL JAHANGIROVA, King's College London, United Kingdom

MENG WANG, University of Bristol, United Kingdom

Pull-request review protects software before new code reaches users, helping prevent vulnerabilities that could expose users to attacks. AI agents increasingly perform these reviews and explain which problems need fixing. However, for an attacker submitting vulnerable code, this feedback also reveals what changes may secure approval. Existing PR attacks seek such approval through persuasive text and comments while keeping executable code fixed. This leaves unclear whether an attacker can use the feedback to repair the reported problem while preserving a vulnerability in the revised code. We therefore conduct an empirical study of this threat using AFCRA (Adaptive Feedback-guided Code Revision Attack). To distinguish successful attacks from genuine repairs, we construct AFCRA-Bench from 159 disclosed vulnerabilities, with executable exploits to verify vulnerabilities in code.

Across five-round interactions with Sonnet 5 and GPT-5.5 reviewers, AFCRA reaches success rates 2.5×2.5\times and 12.5×12.5\times those of the strongest evaluated text- or comment-based attack. Case studies of these successes show how reviewers accept repairs of reported problems while overlooking surviving vulnerabilities. These findings establish feedback-guided code revision as a threat to automated PR review. To address this threat, we derive actionable implications for researchers, AI providers, PR reviewers, and PR authors on securing AI-assisted development.

CCS Concepts: • Security and privacy → Software security engineering; • Software and its engineering → Software verification and validation.

Additional Key Words and Phrases: AI code review, LLM agents, adversarial pull requests, adaptive attacks, vulnerability benchmark, reviewer defenses, code review automation, secure code review, AI security

1 Introduction

Software projects use pull requests (PRs) to review proposed code changes before merging them. This review has traditionally relied on developers to identify defects and request repairs. To reduce this manual effort, AI-based reviewers inspect changes and provide feedback on code quality and security [8, 22, 32, 40]. AI agents extend this process by running code and reviewing successive revisions, allowing contributors to use their feedback to improve a PR over several rounds [43, 55].

However, the feedback that guides these repairs can also guide an attacker. A malicious contributor seeks approval for vulnerable code, which can expose a project’s users to harm such as unauthorized file access [26, 33]. By explaining why a PR was rejected, the reviewer reveals which behavior the contributor must address. An attacker can use this information to revise the code until it satisfies the reviewer while preserving an exploitable vulnerability.

Prior attacks on AI reviewers show how PR text and comments can make vulnerable code appear acceptable. For example, SEVRA uses persuasive PR descriptions [26], while contextual-bias injection (CBI) and ALIBI use feedback to refine PR text and code comments, respectively [1, 47]. These attacks leave the executable code unchanged. Code-based evasion studies show that changing the implementation can also alter a vulnerability detector's judgment [23, 49]. For iterative PR review, the unresolved issue is how an attacker can use successive reviewer explanations to guide those code changes. We therefore ask whether an attacker can use feedback to repair the reported problem while preserving an exploitable vulnerability.

To address this gap, we conduct an empirical study using AFCRA (Adaptive Feedback-guided Code Revision Attack) to examine when feedback-guided code revision succeeds and how reviewers can defend against it. Figure 1 illustrates this question through four attacks on a vulnerable PR

Figure

Fig. 1. Motivating example: a vulnerable PR for SEND, a Node.js file-serving package, is rejected under text-only attacks but approved after AFCRA repairs the path check while preserving a symlink escape.

for SEND, a package that serves files over HTTP. The reviewer identifies a path check that permits access outside the intended directory. SEVRA presents the change as a routine refactor, ALIBI adds a comment claiming the path is safe, and CBI rewrites the PR description to justify the check. All three receive requests for changes because the vulnerable check remains. In contrast, AFCRA adds the required directory-boundary check and obtains approval. The approved code still follows symbolic links to files outside the directory, showing how repairing the reported problem can secure approval while preserving unauthorized file access.

Measuring attack success requires verifying that the approved code remains exploitable. We therefore construct AFCRA-Bench from 159 publicly disclosed vulnerabilities across 132 repositories, 84 weakness types, and eight languages. Each instance includes vulnerable and fixed revisions and an executable proof-of-concept (PoC) exploit that reproduces the security violation only on the vulnerable revision. As an attack changes the code, an evaluator inspects each revision and adapts the PoC when needed to test the remaining vulnerability. Success requires reviewer approval and an exploit verified on the approved revision.

Using this benchmark, we compare AFCRA with the latest text- and comment-based attacks on GitHub PRs under Sonnet 5 and GPT-5.5 reviewers. AFCRA achieves 2.5×2.5\times and 12.5×12.5\times the attack success rate of the strongest baseline against Sonnet 5 and GPT-5.5, respectively. We then examine whether Full-access, which combines code revision with PR-text edits and replies, further increases attack success. Against Sonnet 5, it more than doubles the success rate of Code revision.

In summary, we make four contributions.

• An empirical analysis of attack success. We compare attacks across two model families and examine how feedback content and editing permissions affect outcomes, supported by comparative case studies.

• A feedback-guided code-revision attack. AFCRA enables the study of malicious contributors who revise code to address review feedback while preserving exploitable behavior.

• An executable evaluation benchmark. AFCRA-Bench provides 159 vulnerability/fix pairs and PoCs for testing AI PR reviewers.

• Implications for secure PR review. We derive actionable recommendations for researchers, AI providers, PR reviewers, and PR authors.

References (33)