Prompt Injection attack against LLM-integrated Applications

Yi Liu, Gelei Deng, Yuekang Li, Kailong Wang, Zihao Wang +7 more
6/8/2023
cs.CRcs.AIcs.CL

No official code found. Best implementation: LLMSecurity/HouYi (269 stars, Apache-2.0, last commit 2024-09-12). 1 more below.

Abstract

Large Language Models (LLMs), renowned for their superior proficiency in language comprehension and generation, stimulate a vibrant ecosystem of applications around them. However, their extensive assimilation into various services introduces significant security risks. This study deconstructs the complexities and implications of prompt injection attacks on actual LLM-integrated applications. Initially, we conduct an exploratory analysis on ten commercial applications, highlighting the constraints of current attack strategies in practice. Prompted by these limitations, we subsequently formulate HouYi, a novel black-box prompt injection attack technique, which draws inspiration from traditional web injection attacks. HouYi is compartmentalized into three crucial elements: a seamlessly-incorporated pre-constructed prompt, an injection prompt inducing context partition, and a malicious payload designed to fulfill the attack objectives. Leveraging HouYi, we unveil previously unknown and severe attack outcomes, such as unrestricted arbitrary LLM usage and uncomplicated application prompt theft. We deploy HouYi on 36 actual LLM-integrated applications and discern 31 applications susceptible to prompt injection. 10 vendors have validated our discoveries, including Notion, which has the potential to impact millions of users. Our investigation illuminates both the possible risks of prompt injection attacks and the possible tactics for mitigation.

View on arXivView PDF

Code Implementations(2)

LLMSecurity/HouYiCommunity75%
Apache-2.0

The automated prompt injection framework for LLM-integrated applications.

26946Python, Jupyter NotebookAug 24, 20232 years agoApache-2.0

Prompt injection attack against LLM-integrated applications

00CSS, HTMLMar 20, 20251 years ago

Similar Papers

Cite this paper

@article{liu2023prompt,
  title  = {Prompt Injection attack against LLM-integrated Applications},
  author = {Yi Liu and Gelei Deng and Yuekang Li and Kailong Wang and Zihao Wang and Xiaofeng Wang and Tianwei Zhang and Yepang Liu and Haoyu Wang and Yan Zheng and Leo Yu Zhang and Yang Liu},
  year   = {2023},
  eprint = {2306.05499},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2306.05499v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2306.05499.svg)](https://codeofpaper.com/paper/2306.05499)

Discussion