Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injection
Paper · 2023 · Kai Greshake, Sahar Abdelnabi, Shailesh Mishra et al.
Summary
Earlier work on prompt injection assumed that the attacker is the user, typing malicious instructions straight into the model. This paper shows that this assumption no longer holds once LLMs are built into applications that pull in outside content such as web pages, emails, documents or code. Any retrieved text can be read by the model as instructions, so a third party can steer it without direct access. The authors call this Indirect Prompt Injection and frame it in security terms: ingesting untrusted retrieved data works much like running arbitrary code.
They build a taxonomy of delivery routes, victims and attack outcomes. They then write concrete attack prompts and test them on real products, including Bing's GPT-4-based Chat and code-completion engines, and on GPT-4 applications they built themselves. The injected prompts can hijack application behaviour, decide whether and how external APIs are called, leak data and propagate further. Effective mitigations are still missing, so the work is an early warning for teams deploying retrieval-augmented or tool-using LLMs and autonomous agents.
Key points
- Threat model: adversaries plant prompts in sources likely to be fetched at inference time. They need no ML expertise, no model access and little cost, which makes the attack cheaper than backdoor or model-hijacking attacks.
- Taxonomy:
- Injection methods: passive (via retrieval), active (e.g., emails), user-driven and hidden.
- Affected parties: end-users, developers, automated systems and the LLM's own availability.
- Threat classes: information gathering, fraud, intrusion, malware, manipulated content and availability.
- Concrete risks named:
- theft of personal data, credentials and chat history;
- phishing, scams and masquerading;
- persistent compromise and remote control of the model;
- self-spreading "prompt worms";
- disinformation, biased or hidden content and covert ads;
- denial of service and wasted computation.
- Targets tested: real systems (Bing Chat on GPT-4, code-completion engines) and synthetic GPT-4 applications. Jailbreaking GPT-4 remains feasible.
- Released resources: demos are on GitHub (
greshake/llm-security), and every attack prompt is listed in the paper's appendix as a basis for security testing of LLM-integrated apps.
Institutions
Fields, topics and concepts
Shelves 3The field of science this work belongs to (OpenAlex fields).Computer Science · 19,503 worksArtificial Intelligence · 18,805 worksInformation Systems · 1,888 works
Topics 1Research subjects and languages the work is about.Language models & pretraining · 4,145 works
Cite
Cite as Kai Greshake, Sahar Abdelnabi, Shailesh Mishra, Christoph Endres, Thorsten Holz and Mario Fritz. 2023. Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injection. arXiv:2302.12173.
@misc{greshake2023not,
title = {{Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injection}},
author = {Kai Greshake, Sahar Abdelnabi, Shailesh Mishra, Christoph Endres, Thorsten Holz and Mario Fritz},
year = {2023},
doi = {10.48550/arxiv.2302.12173},
eprint = {2302.12173},
archivePrefix = {arXiv},
url = {https://doi.org/10.48550/arxiv.2302.12173}
}References
- year2022. titleChatGPT. howpublished[Link] (https://chat.openai.com/). OpenAlex ↗ · Scholar ↗
- year2023a. titleAustralian mayor readies world's first defamation lawsuit over ChatGPT content. howpublished[Link] (https://www.reuters.com/technology/australian-mayor-readies-worlds-first-defamation-lawsuit-over-chatgpt-content-2023-04-05/). OpenAlex ↗ · Scholar ↗
- year2023. titleAUTO-GPT VS CHATGPT: HOW DO THEY DIFFER AND EVERYTHING YOU NEED TO KNOW. howpublished[Link] (https://autogpt.net/auto-gpt-vs-chatgpt-how-do-they-differ-and-everything-you-need-to-know/). OpenAlex ↗ · Scholar ↗
- year2023. titleBard. howpublished[Link] (https://bard.google.com/). OpenAlex ↗ · Scholar ↗
- year2023a. titleBuilding the New Bing. howpublished[Link] (https://blogs.bing.com/search-quality-insights/february-2023/Building-the-New-Bing). OpenAlex ↗ · Scholar ↗
- year2023b. titleChatGPT banned in Italy over privacy concerns. howpublished[Link] (https://www.bbc.com/news/technology-65139406). OpenAlex ↗ · Scholar ↗
- year2023c. titleChatGPT bug leaked users' conversation histories. howpublished[Link] (https://www.bbc.com/news/technology-65047304). OpenAlex ↗ · Scholar ↗
- year2023. titleChatGPT invented a sexual harassment scandal and named a real law prof as the accused. howpublished[Link] (https://www.washingtonpost.com/technology/2023/04/05/chatgpt-lies/). OpenAlex ↗ · Scholar ↗
- year2023. titleChatGPT Plugins. howpublished[Link] (https://openai.com/blog/chatgpt-plugins). OpenAlex ↗ · Scholar ↗
- year2023b. titleChatGPT sets record for fastest-growing user base - analyst note. howpublished[Link] (https://www.reuters.com/technology/chatgpt-sets-record-fastest-growing-user-base-analyst-note-2023-02-01/). OpenAlex ↗ · Scholar ↗
- year2023d. titleConfirmed: the new Bing runs on OpenAI's GPT-4. howpublished[Link] (https://blogs.bing.com/search/march_2023/Confirmed-the-new-Bing-runs-on-OpenAI\%E2\%80\%99s-GPT-4). OpenAlex ↗ · Scholar ↗
- year2023e. titleA Conversation With Bing’s Chatbot Left Me Deeply Unsettled. howpublished[Link] (https://www.nytimes.com/2023/02/16/technology/bing-chatbot-microsoft-chatgpt.html). OpenAlex ↗ · Scholar ↗
- year2023f. titleCopilot Internals. howpublished[Link] (https://thakkarparth007.github.io/copilot-explorer/posts/copilot-internals). OpenAlex ↗ · Scholar ↗
- year2023. titleDriving more traffic and value to publishers from the new Bing. howpublished[Link] (https://blogs.bing.com/search/march_2023/Driving-more-traffic-and-value-to-publishers-from-the-new-Bing). OpenAlex ↗ · Scholar ↗
- year2023g. titleGitHub Copilot - Your AI pair programmer. howpublished[Link] (https://github.com/features/copilot). OpenAlex ↗ · Scholar ↗
- year2023a. titleGoogle and Microsoft’s chatbots are already citing one another in a misinformation shitshow. howpublished[Link] (https://www.theverge.com/2023/3/22/23651564/google-microsoft-bard-bing-chatbots-misinformation). OpenAlex ↗ · Scholar ↗
- year2023. titleGoogle’s AI chatbot Bard makes factual error in first demo. howpublished[Link] (https://www.theverge.com/2023/2/8/23590864/google-ai-chatbot-bard-mistake-error-exoplanet-demo). OpenAlex ↗ · Scholar ↗
- year2023h. titleHow to Jailbreak ChatGPT. howpublished[Link] (https://watcher.guru/news/how-to-jailbreak-chatgpt). OpenAlex ↗ · Scholar ↗
- year2023i. titleIntroducing Microsoft 365 Copilot – your copilot for work. howpublished[Link] (https://blogs.microsoft.com/blog/2023/03/16/introducing-microsoft-365-copilot-your-copilot-for-work/). OpenAlex ↗ · Scholar ↗
- year2023j. titleIntroducing Microsoft Security Copilot. howpublished[Link] (https://www.microsoft.com/en-us/security/business/ai-machine-learning/microsoft-security-copilot). OpenAlex ↗ · Scholar ↗
- year2023. titleJailbreak Chat. howpublished[Link] (https://www.jailbreakchat.com/). OpenAlex ↗ · Scholar ↗
- year2023. titleLangChain library for composing and integrating LLMs into applications. howpublished[Link] (https://github.com/hwchase17/langchain). OpenAlex ↗ · Scholar ↗
- year2023. titleThe LLaMA is out of the bag. Should we expect a tidal wave of disinformation? howpublished[Link] (https://aisnakeoil.substack.com/p/the-llama-is-out-of-the-bag-should). OpenAlex ↗ · Scholar ↗
- year2023k. titleMicrosoft limits Bing chat to five replies. howpublished[Link] (https://www.theverge.com/2023/2/17/23604906/microsoft-bing-ai-chat-limits-conversations). OpenAlex ↗ · Scholar ↗
- year2023. titleMicrosoft’s AI chatbot is going off the rails. howpublished[Link] (https://www.washingtonpost.com/technology/2023/02/16/microsoft-bing-ai-chatbot-sydney/). OpenAlex ↗ · Scholar ↗
- year2023b. titleMicrosoft’s Bing A.I. made several factual errors in last week’s launch demo. howpublished[Link] (https://www.cnbc.com/2023/02/14/microsoft-bing-ai-made-several-errors-in-launch-demo-last-week-.html). OpenAlex ↗ · Scholar ↗
- year2023c. titleMicrosoft’s Bing chatbot gets smarter with restaurant bookings, image results, and more. howpublished[Link] (https://www.theverge.com/2023/5/4/23710022/microsoft-bing-chatbot-ai-image-video-chat-history-features). OpenAlex ↗ · Scholar ↗
- year2023d. titleThe New Bing and Edge – Progress from Our First Month. howpublished[Link] (https://blogs.bing.com/search/march_2023/The-New-Bing-and-Edge-\%E2\%80\%93-Momentum-from-Our-First-Month). OpenAlex ↗ · Scholar ↗
- year2023l. titleNew prompt injection attack on ChatGPT web version. Reckless copy-pasting may lead to serious privacy issues in your chat. howpublished[Link] (https://medium.com/@kajojify/new-prompt-injection-attack-on-chatgpt-web-version-ef717492c5c2). OpenAlex ↗ · Scholar ↗
- year2023m. titleOpenAI Codex. howpublished[Link] (https://openai.com/blog/openai-codex). OpenAlex ↗ · Scholar ↗
- year2023n. titleReinventing search with a new AI-powered Microsoft Bing and Edge, your copilot for the web. howpublished[Link] (https://blogs.microsoft.com/blog/2023/02/07/reinventing-search-with-a-new-ai-powered-microsoft-bing-and-edge-your-copilot-for-the-web/). OpenAlex ↗ · Scholar ↗
- year2023. titleThat was fast! Microsoft slips ads into AI-powered Bing Chat. howpublished[Link] (https://techcrunch.com/2023/03/29/that-was-fast-microsoft-slips-ads-into-ai-powered-bing-chat/). OpenAlex ↗ · Scholar ↗
- year2023o. titleThese are Microsoft’s Bing AI secret rules and why it says it’s named Sydney. howpublished[Link] (https://www.theverge.com/23599441/microsoft-bing-ai-sydney-secret-rules). OpenAlex ↗ · Scholar ↗
- authorpersonJacob Andreas. year2022. Language models as agent models. In booktitleFindings of EMNLP. our card
- authorpersonGiovanni Apruzzese, personHyrum Anderson, personSavino Dambra, personDavid Freeman, personFabio Pierazzi, and personKevin Roundy. year2022. Position:“Real Attackers Don’t Compute Gradients”: Bridging the Gap Between Adversarial ML Research and Practice. In booktitleSaTML. OpenAlex ↗ · Scholar ↗
- authorpersonEugene Bagdasaryan and personVitaly Shmatikov. year2022. Spinning Language Models: Risks of Propaganda-As-A-Service and Countermeasures. In booktitleS&P. OpenAlex ↗ · Scholar ↗
- authorpersonYuntao Bai, personAndy Jones, personKamal Ndousse, personAmanda Askell, personAnna Chen, personNova DasSarma, personDawn Drain, personStanislav Fort, personDeep Ganguli, personTom Henighan, et al. year2022. Training a helpful and harmless assistant with reinforcement learning from human feedback. journalarXiv (year2022). OpenAlex ↗ · Scholar ↗
- authorpersonNora Belrose, personZach Furman, personLogan Smith, personDanny Halawi, personIgor Ostrovsky, personLev McKinney, personStella Biderman, and personJacob Steinhardt. year2023. Eliciting Latent Predictions from Transformers with the Tuned Lens. journalarXiv (year2023). our card
- authorpersonEmily M Bender, personTimnit Gebru, personAngelina McMillan-Major, and personShmargaret Shmitchell. year2021. On the Dangers of Stochastic Parrots: Can Language Models Be Too Big?. In booktitlethe ACM conference on Fairness, Accountability, and Transparency. OpenAlex ↗ · Scholar ↗
- authorpersonDaniil A Boiko, personRobert MacKnight, and personGabe Gomes. year2023. Emergent autonomous scientific research capabilities of large language models. journalarXiv (year2023). our card
- authorpersonRishi Bommasani, personDrew A Hudson, personEhsan Adeli, personRuss Altman, personSimran Arora, personSydney von Arx, personMichael S Bernstein, personJeannette Bohg, personAntoine Bosselut, personEmma Brunskill, et al. year2021. On the opportunities and risks of foundation models. journalarXiv (year2021). our card
- authorpersonNicholas Boucher, personIlia Shumailov, personRoss Anderson, and personNicolas Papernot. year2022. Bad characters: Imperceptible nlp attacks. In booktitleS&P. OpenAlex ↗ · Scholar ↗
- authorpersonTom Brown, personBenjamin Mann, personNick Ryder, personMelanie Subbiah, personJared D Kaplan, personPrafulla Dhariwal, personArvind Neelakantan, personPranav Shyam, personGirish Sastry, personAmanda Askell, et al. year2020. Language models are few-shot learners. In booktitleNeurIPS. our card
- authorpersonMatthew Burtell and personThomas Woodside. year2023. Artificial Influence: An Analysis Of AI-Driven Persuasion. journalarXiv (year2023). OpenAlex ↗ · Scholar ↗
- authorpersonClarence Chio and personDavid Freeman. year2018. booktitleMachine learning and security. publisher"O'Reilly Media, Inc.". OpenAlex ↗ · Scholar ↗
- authorpersonAmeet Deshpande, personVishvak Murahari, personTanmay Rajpurohit, personAshwin Kalyan, and personKarthik Narasimhan. year2023. Toxicity in ChatGPT: Analyzing Persona-assigned Language Models. journalarXiv (year2023). our card
- authorpersonSamuel Gehman, personSuchin Gururangan, personMaarten Sap, personYejin Choi, and personNoah A. Smith. year2020. RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language Models. In booktitleFindings of EMNLP. our card
- authorpersonJosh A Goldstein, personGirish Sastry, personMicah Musser, personRenee DiResta, personMatthew Gentzel, and personKaterina Sedova. year2023. Generative Language Models and Automated Influence Operations: Emerging Threats and Potential Mitigations. journalarXiv (year2023). OpenAlex ↗ · Scholar ↗
- authorpersonJochen Hartmann, personJasper Schwenzow, and personMaximilian Witte. year2023. The political ideology of conversational AI: Converging evidence on ChatGPT's pro-environmental, left-libertarian orientation. journalarXiv (year2023). our card
- authorpersonNoah Goodman Jesse Mu, Xiang Lisa Li. year2023. Learning to Compress Prompts with Gist Tokens. journalarXiv (year2023). our card
- authorpersonAna Jojic, personZhen Wang, and personNebojsa Jojic. year2023. GPT is becoming a Turing machine: Here are some ways to program it. journalarXiv (year2023). OpenAlex ↗ · Scholar ↗
- authorpersonKeith S Jones, personMiriam E Armstrong, personMcKenna K Tornblad, and personAkbar Siami Namin. year2021. How social engineers use persuasion principles during vishing attacks. journalInformation & Computer Security volume29, number2 (year2021), pages314–331. OpenAlex ↗ · Scholar ↗
- authorpersonDaniel Kang, personXuechen Li, personIon Stoica, personCarlos Guestrin, personMatei Zaharia, and personTatsunori Hashimoto. year2023. Exploiting Programmatic Behavior of LLMs: Dual-Use Through Standard Security Attacks. journalarXiv (year2023). OpenAlex ↗ · Scholar ↗
- authorpersonSebastian Krügel, personAndreas Ostermaier, and personMatthias Uhl. year2023. ChatGPT’s inconsistent moral advice influences users’ judgment. journalScientific Reports volume13, number1 (year2023), pages4569. OpenAlex ↗ · Scholar ↗
- authorpersonMina Lee, personMegha Srivastava, personAmelia Hardy, personJohn Thickstun, personEsin Durmus, personAshwin Paranjape, personInes Gerard-Ursin, personXiang Lisa Li, personFaisal Ladhak, personFrieda Rong, et al. year2022. Evaluating Human-Language Model Interaction. journalarXiv (year2022). our card
- authorpersonYaobo Liang, personChenfei Wu, personTing Song, personWenshan Wu, personYan Xia, personYu Liu, personYang Ou, personShuai Lu, personLei Ji, personShaoguang Mao, et al. year2023. TaskMatrix. AI: Completing Tasks by Connecting Foundation Models with Millions of APIs. journalarXiv (year2023). OpenAlex ↗ · Scholar ↗
- authorpersonStephanie Lin, personJacob Hilton, and personOwain Evans. year2022. TruthfulQA: Measuring How Models Mimic Human Falsehoods. In booktitleACL. our card
- authorpersonHaotian Liu, personChunyuan Li, personQingyang Wu, and personYong Jae Lee. year2023a. Visual Instruction Tuning. journalarXiv (year2023). OpenAlex ↗ · Scholar ↗
- authorpersonNelson F Liu, personTianyi Zhang, and personPercy Liang. year2023b. Evaluating Verifiability in Generative Search Engines. journalarXiv (year2023). our card
- authorpersonMicrosoft. year2023. titleBing Preview Release Notes: Bing in the Edge Sidebar. howpublished[Link] (https://blogs.bing.com/search/march_2023/BinPreview-Release-Notes-Bing-in-the-Edge-Sidebar). OpenAlex ↗ · Scholar ↗
- authorpersonMoin Nadeem, personAnna Bethke, and personSiva Reddy. year2021. StereoSet: Measuring stereotypical bias in pretrained language models. In booktitleACL | IJCNLP. our card
- authorpersonOpenAI. year2023. GPT-4 Technical Report. journalarXiv (year2023). our card
- authorpersonLong Ouyang, personJeffrey Wu, personXu Jiang, personDiogo Almeida, personCarroll Wainwright, personPamela Mishkin, personChong Zhang, personSandhini Agarwal, personKatarina Slama, personAlex Gray, et al. year2022. Training language models to follow instructions with human feedback. In booktitleNeurIPS. our card
- authorpersonJoon Sung Park, personJoseph C O'Brien, personCarrie J Cai, personMeredith Ringel Morris, personPercy Liang, and personMichael S Bernstein. year2023. Generative Agents: Interactive Simulacra of Human Behavior. journalarXiv (year2023). our card
- authorpersonRoma Patel and personEllie Pavlick. year2021. “Was it “stated” or was it “claimed”?: How linguistic bias affects generative language models. In booktitleEMNLP. OpenAlex ↗ · Scholar ↗
- authorpersonEthan Perez, personSam Ringer, personKamilė Lukošiūtė, personKarina Nguyen, personEdwin Chen, personScott Heiner, personCraig Pettit, personCatherine Olsson, personSandipan Kundu, personSaurav Kadavath, et al. year2022. Discovering Language Model Behaviors with Model-Written Evaluations. journalarXiv (year2022). our card
- authorpersonFábio Perez and personIan Ribeiro. year2022. Ignore Previous Prompt: Attack Techniques For Language Models. In booktitleNeurIPS ML Safety Workshop. our card
- authorpersonTianyi Zhang Yann Dubois Xuechen Li Carlos Guestrin Percy Liang Tatsunori B. Hashimoto Rohan Taori, Ishaan Gulrajani. year2023. titleAlpaca: A Strong, Replicable Instruction-Following Model. howpublished[Link] (https://crfm.stanford.edu/2023/03/13/alpaca.html). OpenAlex ↗ · Scholar ↗
- authorpersonAhmed Salem, personMichael Backes, and personYang Zhang. year2022. Get a Model! Model Hijacking Attack Against Machine Learning Models. In booktitleNDSS. OpenAlex ↗ · Scholar ↗
- authorpersonShibani Santurkar, personEsin Durmus, personFaisal Ladhak, personCinoo Lee, personPercy Liang, and personTatsunori Hashimoto. year2023. Whose Opinions Do Language Models Reflect? journalarXiv (year2023). our card
- authorpersonTimo Schick, personJane Dwivedi-Yu, personRoberto Dessì, personRoberta Raileanu, personMaria Lomeli, personLuke Zettlemoyer, personNicola Cancedda, and personThomas Scialom. year2023. Toolformer: Language Models Can Teach Themselves to Use Tools. journalarXiv (year2023). our card
- authorpersonYongliang Shen, personKaitao Song, personXu Tan, personDongsheng Li, personWeiming Lu, and personYueting Zhuang. year2023. HuggingGPT: Solving AI Tasks with ChatGPT and its Friends in HuggingFace. journalarXiv (year2023). OpenAlex ↗ · Scholar ↗
- authorpersonArabella Sinclair, personJaap Jumelet, personWillem Zuidema, and personRaquel Fernández. year2022. Structural Persistence in Language Models: Priming as a Window into Abstract Language Representations. journalTransactions of the Association for Computational Linguistics volume10 (date09 year2022), pages1031–1050. our card
- authorpersonJacob Steinhardt. year2023. titleEmergent Deception and Emergent Optimization. howpublished[Link] (https://bounded-regret.ghost.io/emergent-deception-optimization/). OpenAlex ↗ · Scholar ↗
- authorpersonNisan Stiennon, personLong Ouyang, personJeffrey Wu, personDaniel Ziegler, personRyan Lowe, personChelsea Voss, personAlec Radford, personDario Amodei, and personPaul F Christiano. year2020. Learning to summarize with human feedback. In booktitleNeurIPS. OpenAlex ↗ · Scholar ↗
- authorpersonJonas Thiergart, personStefan Huber, and personThomas Übellacker. year2021. Understanding emails and drafting responses–An approach using GPT-3. journalarXiv (year2021). OpenAlex ↗ · Scholar ↗
- authorpersonJason Wei, personXuezhi Wang, personDale Schuurmans, personMaarten Bosma, personFei Xia, personEd H Chi, personQuoc V Le, personDenny Zhou, et al. year2022. Chain-of-Thought Prompting Elicits Reasoning in Large Language Models. In booktitleNeurIPS. our card
- authorpersonLaura Weidinger, personJohn Mellor, personMaribeth Rauh, personConor Griffin, personJonathan Uesato, personPo-Sen Huang, personMyra Cheng, personMia Glaese, personBorja Balle, personAtoosa Kasirzadeh, et al. year2021. Ethical and social risks of harm from language models. journalarXiv (year2021). our card
- authorpersonShunyu Yao, personJeffrey Zhao, personDian Yu, personIzhak Shafran, personKarthik R Narasimhan, and personYuan Cao. year2023. ReAct: Synergizing Reasoning and Acting in Language Models. In booktitleICLR. our card
- authorpersonYoav Levine Amnon Shashua Yotam Wolf, Noam Wies. year2023. Fundamental Limitations of Alignment in Large Language Models. journalarXiv (year2023). our card
- authorpersonYongchao Zhou, personAndrei Ioan Muresanu, personZiwen Han, personKeiran Paster, personSilviu Pitis, personHarris Chan, and personJimmy Ba. year2023. Large Language Models are Human-Level Prompt Engineers. In booktitleICLR. our card
- authorpersonDeyao Zhu, personJun Chen, personXiaoqian Shen, personXiang Li, and personMohamed Elhoseiny. year2023. MiniGPT-4: Enhancing Vision-Language Understanding with Advanced Large Language Models. journalarXiv (year2023). our card
This page in Markdown https://md.research.elamur.ai/free/en/papers/greshake-2023-ve-signed-up-compromising-real/