Skip to content
AI / LLM Write-up Advanced

Hacking Google Bard - From Prompt Injection to Data Exfiltration

Bard was susceptible to indirect prompt injection via Google Docs, where injected instructions could make it render an image with a URL containing data.

Johann Rehberger Follow

Published on embracethered.com

Recently Google Bard got some powerful updates, including Extensions. Extensions allow Bard to access YouTube, search for flights and hotels, and also to access a user’s personal documents and emails.

Johann Rehberger (wunderwuzzi23), on embracethered.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the LLM rendered markdown images without sanitising the URL, and the CSP allowed images from google.com domains, enabling data exfiltration via image requests.

Impact

An attacker could exfiltrate data via prompt injection, but the exploit required bypassing CSP and some in-context learning.

What the attacker needed

Victim uses Bard with Extensions; malicious content is in a Google Doc

The fix

The text does not state whether or how the issue was fixed.

How it was found

  1. User chats with Bard, providing some text.
  2. User has a Google Doc containing prompt injection instructions.
  3. The injected instructions cause Bard to render an image with a URL containing data.
  4. The image loads from an attacker-controlled endpoint, exfiltrating data.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Google Bard can read your Google Docs and emails. If a document contains hidden instructions, Bard may follow them, which is called indirect prompt injection.

What is AI / LLM?

Prompt injection, data exfiltration and tool abuse in features built on language models, and the ordinary bugs around them.

More by Johann Rehberger

View all

8 more disclosed reports, best first.

More from Google (Bard)

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

AI and LLM vulnerabilities

The lesson behind this report.

Prompt injection, data exfiltration and tool abuse in features built on language models, and the ordinary bugs around them.