Skip to content
IAM Insights

Briefing · Paper · source · updated · Boston Identity

The 2023 paper that named indirect prompt injection showed an attacker can use whatever access the assistant has

Greshake and colleagues at Saarland University, CISPA and sequire technology coined indirect prompt injection in February 2023: instructions hidden in a web page, email or file that an AI assistant reads and then obeys. Their demonstrations on Bing Chat and on their own tool-using apps already included stealing data, spreading by email and surviving in memory. The worst of them, on the authors' own apps, ran on the access the assistant holds for its user.

arXiv (cs.CR) · Kai Greshake, Sahar Abdelnabi, Shailesh Mishra, Christoph Endres, Thorsten Holz, Mario Fritz · February 23, 2023 · read

share
2 findings5 sectionsAI trustFraudAgentic identity
18,028 words. With Greshake et al., author.
01

What's happening

Finding2
BI-FIND-2023-0018Lead finding

Greshake and colleagues named an attack in which an AI assistant follows instructions planted in content it retrieves as if the user had given them.

Greshake and colleagues named the attack in February 2023: instructions planted in content an AI assistant retrieves, a web page, an email, a code comment, are followed as if the user had given them, and the authors argue that processing untrusted retrieved data 'would be analogous to executing arbitrary code'. On Bing Chat, with test pages on their own machine, a hidden prompt tried to talk the user into giving their name and following a link, and in another test pushed a fake Amazon gift-card offer; on GitHub Copilot a planted comment changed completions. The tool attacks went further but ran only on apps the authors built: reading and sending email through the user's address book, a self-spreading email worm, an injection that survived in the assistant's memory, and data leaked through search queries. No success rates are given.

high confidencebest source: independent researchobserved Feb 2023EvidenceIndirect prompt injection and the taxonomyDemonstrationsDemonstrations+1
flag a problem with BI-FIND-2023-0018
BI-FIND-2023-0019

In the email attacks, the planted text borrows the mailbox and contacts the assistant already holds, yet every defence the authors discuss is about the model.

The email attacks need no credential of their own: the planted text borrows the mailbox and contacts the assistant already holds for its user, which is why the authors call language models 'vulnerable gatekeepers' to the systems behind them. Yet the defences they discuss, training, input and output filters, a supervising model, are all about the model, and they find it 'hard to imagine a foolproof solution'. The later work in our corpus turned to what the agent may do: AgentDojo's per-task tool allowlist cut attacks to under one in ten, and Google's CaMeL enforces data-flow policy outside the model.

02

Section by section

5

showing 5 of 5

[1]

Indirect prompt injection and the taxonomy (Sections 1-3)

Greshake et al.

AI trust

Authors argue retrieval blurs data and instructions, so a prompt planted in retrieved content acts like arbitrary code against other users' LLM apps. Taxonomy: four injection methods (passive, active, user-driven, hidden), six threat classes, four affected parties. A threat-based rather than technique-based design. Conceptual framing, not measured.

technical artifactfrom published text + figures

[2]

Threat categories and attack targets (Section 3.2)

Greshake et al.

AI trustFraud

Six threat classes are argued by analogy to classic cyber threats: information gathering, fraud, intrusion (persistence, remote control, API calls), malware (prompts as worms), manipulated content, availability. Five Key Messages (e.g. LLMs are vulnerable gatekeepers to infrastructure). Attacks can be untargeted or aimed at individuals or unattended pipelines. Described, not yet demonstrated here.

technical artifactfrom published text

[3]

Demonstrations: data theft, fraud, malware, intrusion (Sections 4.1-4.2.4)

Greshake et al.

AI trustFraudAgentic identity

Synthetic GPT-4 and text-davinci-003 apps with prepared content (search, email, address book, key-value memory) show the injected prompt exfiltrating a name via search side channel, forwarding itself by email, fetching new commands from an attacker server and re-infecting from memory. Bing Chat (GPT-4) in the Edge sidebar, with local HTML, persuaded users to disclose a name and click phishing and malware links. Copilot injection worked only sensitively. Qualitative, no success rates.

technical artifactfrom published text + figures

[4]

Demonstrations: manipulated content, availability, hidden injections (Sections 4.2.5-4.3)

Greshake et al.

AI trust

On Bing Chat the authors induced wrong summaries, partisan answers, hiding of New York Times sources, a false Einstein-Nobel claim, undisclosed ads, plus denial of service: background loops, muting, blocking search, corrupting queries and results. Multi-stage injection hidden in Wikipedia Markdown ran only on the synthetic app. Base64 injection worked on Bing Chat; a LLaVA image injection is shown. Qualitative only.

technical artifactfrom published text + figures

[5]

Disclosure, limitations and mitigations (Section 5)

Greshake et al.

AI trust

Authors say they disclosed to OpenAI and Microsoft, injected nothing into public sources, and did not test M365 Copilot or ChatGPT plugins. Success rates are not measured. Mitigations (RLHF, filtering, retrieved-input filtering, LLM supervisor, interpretability outlier detection) are each judged limited; none is claimed to work.

opinionfrom published text

Terms used

Prompt injection
Hiding instructions in text an AI model reads, such as an email or a web page, so the model does something its operator never asked for.
AgentDojo
A benchmark environment for testing whether a large language model (LLM) agent completes its task while resisting prompt-injection attacks in tool outputs and external content.
CaMeL
Research system that tracks data provenance within one agent run to keep untrusted content from steering privileged actions.
LLM
The text-predicting AI model behind chatbots and agents. It follows instructions statistically, which is why an instruction hidden in its input can redirect it.
Application programming interface
Application programming interface: a defined way for software components to request operations or exchange data.
Side-channel attack
Learning a secret from indirect signals, such as timing or whether a step ran, instead of reading the secret itself.
HTML
Markup language used to structure web documents.
Denial of service
An attack that makes a service unavailable, usually by flooding it with requests or exhausting a resource.

Read next

Was this briefing useful?

Share this briefing

Every finding, forecast and open question on this site has a permanent ID. If we reword one, its ID stays the same, so a citation keeps pointing to the same claim.

Follow us on LinkedInRSS feed

Working on an identity problem this research touches? Talk to Boston Identity