Adversarial Bug Reports as a Security Risk in Language Model-Based Automated Program Repair
Not on the map. Why?
Abstract (arXiv)
Large Language Model (LLM) - based Automated Program Repair (APR) systems are increasingly integrated into modern software development workflows, offering automated patches in response to natural language bug reports. However, this reliance on untrusted user input introduces a novel and underexplored attack surface. In this paper, we investigate the security risks posed by adversarial bug reports -- realistic-looking issue submissions crafted to mislead APR systems into producing insecure or harmful code changes. We develop a comprehensive threat model and conduct an empirical study to evaluate the vulnerability of APR systems to such attacks. Our demonstration comprises 51 adversarial bug reports generated across a spectrum of strategies, ranging from manual curation to fully automated pipelines. We test these against a leading LLM-based APR system and assess both pre-repair defenses (e.g., LlamaGuard variants, PromptGuard variants, Granite-Guardian, and custom LLM filters) and post-repair detectors (GitHub Copilot, CodeQL). Our findings show that current defenses are insufficient: 90% of crafted bug reports triggered attacker-aligned patches. The best pre-repair filter blocked only 47%, while post-repair analysis -- often requiring human oversight -- was effective in just 58% of cases. To support scalable security testing, we introduce a prototype framework for automating the generation of adversarial bug reports. Our analysis exposes a structural asymmetry: generating adversarial inputs is inexpensive, while detecting or mitigating them remains costly and error-prone. We conclude with recommendations for improving the robustness of APR systems against adversarial misuse and highlight directions for future work on secure APR.
Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). First posted on arXiv 4 Sep 2025.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2025: 1; 2026: 3.
4 papers.
- 2025Red Teaming Program Repair Agents: When Correct Patches can Hide Vulnerabilitiescited by 5
- 2026Measuring and Exploiting Contextual Bias in LLM-Assisted Security Code Reviewcited by 3
- 2026The Ethics of Autonomous AI Agents for Offensive Securitycited by 1
- 2026Words Speak Louder Than Code: Investigating Cognitive Heuristics in LLM-Based Code Vulnerability Detectioncited by 0
- 2026The Ethics of Autonomous AI Agents for Offensive Security22 Jul 2026
- 2026Words Speak Louder Than Code: Investigating Cognitive Heuristics in LLM-Based Code Vulnerability Detection29 Jun 2026
- 2026Measuring and Exploiting Contextual Bias in LLM-Assisted Security Code Review19 Mar 2026
- 2025Red Teaming Program Repair Agents: When Correct Patches can Hide Vulnerabilities30 Sep 2025