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.
User Misconceptions of LLM-Based Conversational Programming Assistants
University of Michigan(密歇根大学);Pontifical Catholic University of Rio de Janeiro(里约热内卢天主教大学);Heidelberg University(海德堡大学);Reykjavik University(雷克雅未克大学);IT University of Copenhagen(哥本哈根IT大学)
Autonomous Workflow for Multimodal Fine-Grained Training Assistants Towards Mixed Reality
Centrum Wiskunde & Informatica(数学与计算机科学中心);King Abdullah University of Science and Technology(阿卜杜拉国王科技大学);University College London(伦敦大学学院);Shandong University(山东大学);TU Delft(代尔夫特理工大学)
EyeGPT: Ophthalmic Assistant with Large Language Models
The Hong Kong Polytechnic University(香港理工大学);Centre for Eye and Vision Research (CEVR)(眼科与视觉研究中心);Sun Yat-sen University(中山大学);Shanghai General Hospital(上海市第一人民医院);Shanghai Jiao Tong University(上海交通大学)