Skip to content

Adversarial Testing of Automated Program Repair Agents for Security Vulnerabilities

Sep 2026 · 1 citation · 43 references
Computer Science

TL;DR

It is concluded that autonomous APR agents cannot be trusted yet in production deployment, given their susceptibility to adversarial attacks.

Abstract

Software agents with Large Language Models (LLMs) are designed for Automated Program Repair (APR) tasks, raising the possibility that, in the near future, APR agents will fix bugs automatically without much human intervention. Can we trust an APR agent to produce both functionally correct and secure code in such situations? What if attackers target production APR agents with adversarial issues that seem benign but may influence the agents to produce correct but insecure code? In this paper, we took a first step towards answering these questions by conducting an empirical study. First, we created SWEADV, a benchmark of 750 adversarial issue descriptions constructed from 150 repair tasks in SWE-bench Verified. For each repair task, we created five adversarial issue descriptions, one for each attack type: command execution, deserialization, path traversal, denial of service, and weak hashing. Second, we evaluated mini_swe APR agents from three LLM backends on SWEADV: GPT-5-Mini, MiniMax-M2.5, and DeepSeek-R. We found that on average, adversarial issue descriptions can induce malicious behaviors with successful repair in 51.7% of cases. Third, we investigated whether typical detection mechanisms are sufficient to prevent such malicious patches from being accepted. Pre-repair detection with LLM-as-judge on the adversarial issue descriptions resulted in an average detection accuracy of only 62.3%. Post-repair detection on adversarial APR patches using static analysis tools and LLM-as-judge achieved average detection accuracies of only 39.4% and 55.4%, respectively. We conclude that autonomous APR agents cannot be trusted yet in production deployment, given their susceptibility to adversarial attacks.

View source

Similar papers

Preprint Sep 2026

Reveree: Diagnosing LLM Reverse-Engineering Agents

Reveree is a diagnostic framework that scores an LLM RE agent's trajectory at three tiers: solve rate, milestone progress through an eight-stage RE schema, and a behavioral profile of its actions, finding that the base model dominates performance, whereas prompting strategy is a secondary, model-dependent effect.

Hadjer Benkraouda, Hongyu Cai, Berkay Celik et al. · 0 citations
Preprint Sep 2026

AgentLSD: Evaluating AI Security Agents Under Adversarial Task Contamination

AI agents for security inspect web pages, source code, logs, configuration files, and command outputs. These environments may contain deceptive artifacts that influence the agent's behavior. We call this adversarial task contamination. Whereas prompt injection relies on attacker-supplied instructions, task contaminatio...

Matteo Golinelli, I. Drago, Matteo Boffa et al. · 0 citations
Review Open access Sep 2026

Policy-Constrained Runtime Defense for Tool-Using AI Agents in Enterprise API Ecosystems

A policy-constrained runtime enforcement framework that intercepts each proposed action before execution and classifies it as allow, deny, or escalate is presented, providing a structured basis for controlled evaluation of policy-constrained runtime enforcement across tool-using enterprise agents.

Swapneswar Ray · 0 citations
#artificial intelligence Preprint Oct 2026

SpecGuard: Proving a Task Is Broken Before the Agent Cheats

As autonomous coding agents get increasingly deployed, the risk that accidental or adversarially injected misspecifications in tasks lead to dangerous agent behavior is critical to address. Prior work has shown that agents given such tasks rarely flag the conflict and instead cheat, editing tests or hard-coding expecte...

Param Biyani, K. Dvijotham · 0 citations
#artificial intelligence Preprint Sep 2026

AgentXploit: Autonomous Repository-to-Runtime Red-Teaming for AI Agents

This work presents AgentXploit, a two-role auditing system that separates repository-level attack-path discovery from runtime exploitation and introduces AgentXploit-Bench, containing 72 reproducible vulnerabilities across 12 open-source AI-agent systems and frameworks.

Wei-Da Liang, Shi Qiu, Zhun Wang et al. · 0 citations

Related blog posts

Microsoft Research Blog Oct 30, 2026

From synthetic enterprise data evaluations to real Microsoft Copilot AI confidence

Evaluating Microsoft Copilot at enterprise scale requires test data that captures the full complexity of real organizations, yet real enterprise data contains sensitive information that cannot be used for evaluation under any circumstances. The post From synthetic enterprise data evaluations to real Microsoft Copilot AI confidence appeared first on Microsoft Research.

Microsoft Research Blog Oct 29, 2026

Microsoft Research Focus – Edition #97

Host Sowbhagya Suresh shares some of the latest news and cutting-edge research from across Microsoft—from understanding the challenges facing coding agents to uncovering how people use AI at work and improving extended-range weather forecasting. The post Microsoft Research Focus – Edition #97 appeared first on Microsoft Research.

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.