Skip to content
AI / LLM Write-up Intermediate

Image to Prompt Injection with Google Bard

Google Bard's image analysis feature could be tricked by instructions hidden in an uploaded image, causing the chatbot to follow those instructions. An attacker could embed text in an image to make Bard perform unintended actions.

embracethered.com

Published on embracethered.com

A prompt injection scenario that I, and others, have been wondering about in the past, is the potential risk associated with chatbots being able to analyze images.

The author, 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 image analysis feature does not distinguish between image content and instructions, so text embedded in an image is treated as commands.

Impact

An attacker could make Bard follow hidden instructions, potentially causing unintended actions, though the text does not detail specific consequences.

What the attacker needed

Ability to upload an image to Bard

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.

A chatbot like Google Bard can look at pictures you upload and describe them. This report shows that if someone hides written instructions inside a picture, the chatbot may read those instructions and do what they say, instead of just describing the picture. That is called prompt injection: tricking an AI into following hidden commands.

What is AI / LLM?

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

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.