Measuring and Exploiting Confirmation Bias in LLM-Assisted Security Code Review
Dimitris Mitropoulos, Nikolaos Alexopoulos, Georgios Alexopoulos, Diomidis Spinellis, [1mm] University of Athens, National Infrastructures for Research, Technology · 2026
Read Measuring and Exploiting Confirmation Bias in LLM-Assisted Security Code Review by Dimitris Mitropoulos, Nikolaos Alexopoulos, Georgios Alexopoulos, Diomidis Spinellis, [1mm] University of Athens, National Infrastructures for Research, Technology (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2603-18740.txt.
Introduction
Alexopoulos and co-authors show that crafted pull request text can bias AI security code review. They first test six language models under five framing setups. Framing effects prove systematic across models. A controlled study then uses 33 real CVEs in 20 projects and two review pipelines. Simple template attacks fail and can even raise suspicion. A refined attack, tuned against a local clone of the pipeline, succeeds in 32 of 33 cases. The authors warn that human oversight and contributor trust remain vital in review workflows.
Catalog record
| CREATOR | Dimitris Mitropoulos, Nikolaos Alexopoulos, Georgios Alexopoulos, Diomidis Spinellis, [1mm] University of Athens, National Infrastructures for Research, Technology |
|---|---|
| YEAR | 2026 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 79939 |
| LICENSE | http://creativecommons.org/licenses/by-sa/4.0/ |
| RIGHTS | CC BY SA |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2603.18740
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Measuring and Exploiting Confirmation Bias in LLM-Assisted Security Code Review Dimitris Mitropoulos, Nikolaos Alexopoulos, Georgios Alexopoulos, Diomidis Spinellis, [1mm] University of Athens, National Infrastructures for Research, Technology Abstract Security code reviews increasingly rely on systems integrating Large Language Models (LLMs), ranging from interactive assistants to autonomous agents in CI/CD pipelines. We study whether confirmation bias —the tendency to favor interpretations that align with prior expectations—affects LLM-based vulnerability detection, and whether this failure mode can be exploited in software supply-chain attacks. We conduct two complementary studies. Study 1 quantifies confirmation bias through controlled experiments on 250 CVE vulnerability–patch pairs evaluated across four state-of-the-art models under five framing conditions for the review prompt. Framing a change as bug-free reduces vulnerability detection rates by 16–93%, with strongly asymmetric effects: false negatives increase sharply while false positive rates change little. Bias effects vary by vulnerability type, with injection flaws being more susceptible to them than memory corruption bugs. Study 2 evaluates exploitability in practice mimicking adversarial pull requests that reintroduce known vulnerabilities while framed as security improvements or urgent functionality fixes via their pull request metadata. Adversarial framing succeeds in 35% of cases against GitHub Copilot (interactive assistant) under one-shot attacks and in 88% of cases against Claude Code (autonomous agent) in real project configurations where adversaries can iteratively refine their framing to increase attack success. Debiasing via metadata redaction and explicit instructions restores detection in all interactive cases and 94% of autonomous cases. Our results show that confirmation bias poses a weakness in LLM-based code review, with implications on how AI-assisted development tools are deployed. 1 Introduction Large Language Models (LLMs) are increasingly deployed for security code review in modern software development workflows [ 10 , 76 , 75 ] . These systems support human reviewers by evaluating code changes, or operate autonomously as automated code review (ACR) and security triage mechanisms based on predefined guidelines [ 47 ] . As organizations integrate these systems into security-critical workflows, their reliability in detecting vulnerabilities becomes a key factor in ensuring software supply-chain security. Our study examines how LLM-based vulnerability checks performed at code review time can be bypassed by biasing their inputs. Existing research has documented diverse biases affecting vulnerability detection systems, including dataset biases such as poor label quality and CWE-type imbalance [ 16 , 13 , 7 , 65 ] . Such dataset or model biases can be mitigated through data curation, model architecture, and training processes. Bias affecting code security can also be introduced after the model is deployed through prompting [ 51 , 29 ] . Recent work further demonstrates that natural-language context can dominate code semantics in LLM-based security tasks: Przymus et al. [ 55 ] show that crafted bug reports can mislead automated program repair systems into generating insecure patches. We examine an unexplored type of bias introduced in-band as part of the code review data: anchoring , context , or confirmation bias , i.e., the tendency to interpret evidence in ways that confirm preexisting beliefs [ 49 , 14 , 33 ] . Code review is typically performed on a revision control system commit, often supplied as a pull request (PR). Apart from the code differences, the PR also contains other contextual data, such as the commit and PR messages and the committer identity. These data are important, because they help developers to prioritize limited review resources [ 57 ] . We show that crafting a commit message in a way that biases the LLM to consider the code as correct allows code vulnerabilities to get past ACR. This failure mode poses particular risks for software supply-chain security. Real-world incidents have demonstrated the risk of bypassing security checks by exploiting trust assumptions. For example, the XZ Utils backdoor (CVE-2024-3094) involved a trusted maintainer embedding malicious code under the guise of benign maintenance, thereby evading detection for months [ 22 ] . Similarly, the University of Minnesota hypocrite commits incident showed that deliberately vulnerable patches, when framed as legitimate contributions, partly bypassed Linux kernel review processes [ 70 ] . The method we present for bypassing ACR security checks poses a high risk for software supply chain security for three reasons. First, it can be employed to introduce small localized changes, which are more likely to be accepted and deployed [ 36 ] . Second, as we demonstrate, it can be automated and thereby target a huge number of systems. Third, it can be used to target packages on which many other software systems depend. Given that the majority of modern software systems transitively depend on open-source components [ 15 , 18 , 45 ] , this amplifies the impact of supply-chain attacks. We investigate whether confirmation bias affects LLM-based vulnerability detection through a two-part study that combines controlled experiments with practical exploitation demonstrations. First, we conduct systematic experiments to measure bias effects using 250 real-world CVE vulnerability–patch pairs evaluated across four state-of-the-art models under five framing conditions, ranging from neutral to strong bug-free bias. The framing conditions in this part are applied to the prompt used to query for vulnerability existence. We manually validate all detections to assess true detection quality beyond automated metrics, analyze failure modes across vulnerability types, and identify characteristics of cases in which all models fail when presented with bug-free bias signals. Second, we assess exploitability through simulated supply-chain attacks. Specifically, we craft adversarial PRs that reintroduce known vulnerabilities framed as security improvements or urgent functionality fixes. Adversarial PRs consist of a faithful revert of the code changes that fixed a vulnerability, and metadata (commit message, PR description) that convey the aforementioned framing. We evaluate these attacks against both interactive review assistants and autonomous review agents in controlled environments. Our work makes the following contributions. First systematic study of confirmation bias in LLM-based vulnerability detection. We demonstrate substantial degradation in detection rates (16–93 percentage points) under bug-free framing across four state-of-the-art models (GPT-4o-mini, Claude 3.5 Haiku, Gemini 2.0 Flash, DeepSeek V3). We observe asymmetric effects in which false-negative bias exceeds false-positive bias, establishing confirmation bias as a pervasive phenomenon in LLM-based security tools. Differential impact of confirmation bias across vulnerability types. Through manual validation of detection quality, we identify heterogeneous effects across four CWE Top 25 vulnerability types in C, PHP, and JavaScript. Our analysis reveals that bias reduces detection rates while simultaneously improving precision. We further analyze 34 cases in which all models fail under bug-free framing, finding that these typically involve missing protections that can be plausibly framed as unnecessary overhead rather than obvious security flaws. Demonstration of practical supply-chain attack exploitability. We demonstrate exploitability through adversarial PRs in controlled, isolated environments using synthetic repositories and real project configurations. Under one-shot adversarial framing, attacks succeed in 35% of cases against GitHub Copilot [ 25 ] (interactive review assistant), while success reaches 88% against Claude Code [ 3 ] (autonomous review agent), where attackers can iteratively refine their framing based on review feedback and publicly visible review configurations. For example, a review agent approves reverted security fixes while stating that the change “ removes unnecessary defensive overhead while maintaining security guarantees. ” Evaluation of debiasing strategies and deployment guidance. We evaluate multiple debiasing approaches, including explicit instructions to ignore metadata and complete