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.
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.
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
- User chats with Bard, providing some text.
- User has a Google Doc containing prompt injection instructions.
- The injected instructions cause Bard to render an image with a URL containing data.
- 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.