MaPPing Your Model: Assessing the Impact of Adversarial Attacks on LLM-based Programming Assistants
Not on the map. Why?
Abstract (arXiv)
LLM-based programming assistants offer the promise of programming faster but with the risk of introducing more security vulnerabilities. Prior work has studied how LLMs could be maliciously fine-tuned to suggest vulnerabilities more often. With the rise of agentic LLMs, which may use results from an untrusted third party, there is a growing risk of attacks on the model's prompt. We introduce the Malicious Programming Prompt (MaPP) attack, in which an attacker adds a small amount of text to a prompt for a programming task (under 500 bytes). We show that our prompt strategy can cause an LLM to add vulnerabilities while continuing to write otherwise correct code. We evaluate three prompts on seven common LLMs, from basic to state-of-the-art commercial models. Using the HumanEval benchmark, we find that our prompts are broadly effective, with no customization required for different LLMs. Furthermore, the LLMs that are best at HumanEval are also best at following our malicious instructions, suggesting that simply scaling language models will not prevent MaPP attacks. Using a dataset of eight CWEs in 16 scenarios, we find that MaPP attacks are also effective at implementing specific and targeted vulnerabilities across a range of models. Our work highlights the need to secure LLM prompts against manipulation as well as rigorously auditing code generated with the help of LLMs.
Key facts. Cited by 5 papers in the map (data through 7 Oct 2026). Builds on 11 of its 23 references that are in the map. First posted on arXiv 12 Jul 2024.
Builds on
11 of 23 references.
References · 11
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,160
- 2023Quantifying Language Models' Sensitivity to Spurious Features in Prompt Design or: How I learned to start worrying about prompt formattingcited by 778
- 2021Asleep at the Keyboard? Assessing the Security of GitHub Copilot's Code Contributionscited by 417
- 2020Weight Poisoning Attacks on Pre-trained Modelscited by 318
- 2023Poisoning Language Models During Instruction Tuningcited by 254
- 2022Do Users Write More Insecure Code with AI Assistants?cited by 186
- 2020You Autocomplete Me: Poisoning Vulnerabilities in Neural Code Completioncited by 112
- 2023Towards A Unified Agent with Foundation Modelscited by 46
- 2023DeceptPrompt: Exploiting LLM-driven Code Generation via Adversarial Natural Language Instructionscited by 31
- 2024The RealHumanEval: Evaluating Large Language Models' Abilities to Support Programmerscited by 28
Built on by
Citing papers per year: 2025: 4; 2026: 1.
5 papers.
- 2025RedCoder: Automated Multi-Turn Red Teaming for Code LLMscited by 8
- 2025Red Teaming Program Repair Agents: When Correct Patches can Hide Vulnerabilitiescited by 4
- 2025SOK: Exploring Hallucinations and Security Risks in AI-Assisted Software Development with Insights for LLM Deploymentcited by 2
- 2025A Survey: Towards Privacy and Security in Mobile Large Language Modelscited by 1
- 2026IssueTrojanBench: Benchmarking AI Coding Agents Against Malicious Issue Requestscited by 1
- 2026IssueTrojanBench: Benchmarking AI Coding Agents Against Malicious Issue Requests22 Jul 2026
- 2025Red Teaming Program Repair Agents: When Correct Patches can Hide Vulnerabilities30 Sep 2025
- 2025A Survey: Towards Privacy and Security in Mobile Large Language Models2 Sep 2025
- 2025RedCoder: Automated Multi-Turn Red Teaming for Code LLMs25 Jun 2025
- 2025SOK: Exploring Hallucinations and Security Risks in AI-Assisted Software Development with Insights for LLM Deployment31 Jan 2025
Similar, not cited
Close in wording, no citation either way
- 2025Breaking to Build: A Threat Model of Prompt-Based Attacks for Securing LLMs
- 2025System Prompt Poisoning: Persistent Attacks on Large Language Models Beyond User Injection
- 2024ShadowCode: Towards (Automatic) External Prompt Injection Attack against Code LLMs
- 2025Measuring the Security of Mobile LLM Agents under Adversarial Prompts from Untrusted Third-Party Channels
- 2024From Allies to Adversaries: Manipulating LLM Tool-Calling through Adversarial Injection
- 2026From Prompt Injection to Web Exploitation: Revisiting Classic Vulnerabilities in LLM-Integrated Applications
- 2025From ASR to ASP: Evaluating Prompt Attack Vulnerabilities Against Open-Source LLMs
- 2025Are My Optimized Prompts Compromised? Exploring Vulnerabilities of LLM-based Optimizers