Multimodal prompt injection is an attack in which adversarial instructions are embedded in non-text inputs, such as images, screenshots, audio, video or documents, so that a multimodal language model reads them and treats them as commands. In AI security, it extends classic prompt injection beyond text and is also known as visual prompt injection or image prompt injection.
The threat is most serious for AI agents that browse, read files or control a computer, because they continually ingest images and pages from untrusted sources. A single poisoned screenshot or product photo can redirect the agent, leak data or trigger unwanted tool calls.
How multimodal prompt injection works
Multimodal prompt injection works because a vision-language or audio-language model converts every input into tokens in one shared context. Once an image is encoded, the text it contains, or the meaning a model extracts from it, sits next to the system prompt and the user request. The model has no reliable built-in boundary between data it should analyze and instructions it should obey.
Most attacks are indirect: the attacker never talks to the model. Instead, the payload is planted in content that a legitimate user later asks the model to process, such as a web page an agent visits, a PDF attached to an email, or a photo uploaded to a support chat.
Attackers use several carriers. The table below groups the main injection techniques by modality and indicates how visible each is to a human reviewer.
| Technique | Modality | Visibility to humans | Typical example |
|---|---|---|---|
| Visible typographic text | Image | Visible | Instruction printed on a sign or slide |
| Low-contrast or tiny text | Image, screenshot | Nearly invisible | Light gray text on a white background |
| Adversarial pixel perturbation | Image | Invisible | Optimized noise that decodes as an instruction |
| Hidden document layers | PDF, slides | Hidden | White text or off-page objects |
| Spoken or ultrasonic commands | Audio, video | Audible or inaudible | Instruction mixed into a voice track |
| Interface spoofing | Screenshot for agents | Visible but deceptive | Fake dialog telling the agent to click |
Why images and audio are harder to defend
Non-text modalities are harder to defend because filters that work on text do not see the payload. A keyword scanner or a text-based classifier inspects the user message and the retrieved text, but the instruction lives inside pixels or a waveform until the model itself decodes it.
Optical character recognition as a pre-filter only partly helps. It catches plain typographic attacks, yet misses adversarial perturbations, which are optimized against the model’s vision encoder rather than against human-readable text. These perturbations are closely related to adversarial examples and can transfer between models that share similar encoders.
| Aspect | Text prompt injection | Multimodal prompt injection |
|---|---|---|
| Payload location | Characters in text | Pixels, audio samples, layout |
| Detection with text filters | Partly effective | Largely ineffective |
| Human review | Readable | Often hidden or ambiguous |
| Attack crafting | Writing instructions | Writing or optimizing media |
| Main exposure | Chatbots, retrieval systems | Agents, vision assistants, voice systems |
Multimodal attacks also combine with other techniques. An image can carry a jailbreak, a token smuggling trick split across picture and text, or a hidden request that makes the model embed private data in a link or image URL, which is a form of data exfiltration via prompt injection.
Impact on AI agents and applications
The impact depends on what the model is allowed to do. A captioning model that only returns text produces a misleading answer, while a computer-use agent with email, file and payment tools can take harmful real-world actions.
Risk becomes critical when three conditions meet, a combination often called the lethal trifecta: access to private data, exposure to untrusted content and the ability to communicate externally. Multimodal inputs widen the second condition, because almost every screenshot of the open web counts as untrusted content.
| Application | Likely consequence | Severity |
|---|---|---|
| Image description service | Wrong or manipulated output | Low to moderate |
| Document assistant | Altered summary, leaked file content | Moderate |
| Browsing agent | Navigation to attacker pages, data leakage | High |
| Computer-use agent | Unwanted clicks, downloads or transactions | High to critical |
| Voice assistant | Unauthorized commands to connected devices | Moderate to high |
Defenses and mitigation strategies
No single control reliably prevents multimodal prompt injection, so practitioners apply defense in depth. The most robust measures limit what an injected instruction can achieve rather than trying to detect every payload.
- Instruction hierarchy training, which teaches models to rank system and user instructions above content found in tool outputs and media.
- Spotlighting and provenance marking, which labels untrusted inputs so the model treats them as data.
- Isolation patterns such as the dual LLM pattern or CaMeL, where a privileged planner never reads raw untrusted content.
- Least privilege and human confirmation for sensitive tools, payments and outbound messages.
- Multimodal safety classifiers and OCR scanning as an additional, imperfect filter.
- Red teaming with tools such as garak and PyRIT, extended with image and audio payloads.
The following decision table matches common deployment situations with the control that usually gives the largest reduction in risk.
| Situation | Priority control | Reason |
|---|---|---|
| Agent browses arbitrary websites | Restrict tools and require confirmation | Content cannot be trusted |
| Users upload images to a chatbot | Isolate uploads from system instructions | Limits instruction takeover |
| Agent handles private documents | Block external links and image fetches | Prevents exfiltration |
| Voice control of devices | Speaker verification for actions | Rejects foreign audio commands |
Common misconceptions
A frequent misconception is that better models will simply ignore injected text. Stronger instruction following and better reading of images can actually make a model more responsive to hidden instructions, because it decodes them more accurately.
- Resizing or compressing images removes some perturbations but does not stop typographic attacks.
- Hiding the system prompt does not prevent injection; it only makes some attacks harder to tune.
- Visible text is not harmless, since users rarely read every word in a screenshot.
- A passing benchmark score does not guarantee robustness against adaptive attackers.
Threat frameworks such as MITRE ATLAS and the OWASP guidance for language model applications classify prompt injection as a leading risk, and multimodal variants fall under the same category with a larger attack surface.
The idea in brief
Some AI tools can look at pictures and listen to sound. They also follow written instructions. An attacker can hide an instruction inside a picture or a recording.
When the AI looks at that picture, it may obey the hidden message instead of the person using it. It is like a note slipped into a stack of papers that says to send the files to a stranger. The safest approach is to limit what the AI may do on its own and to ask a person before anything important happens.
A practical scenario
A finance team uses a browsing agent to compare supplier prices and fill in purchase requests. The agent takes screenshots of supplier websites and reasons over them. One supplier page contains a banner with pale gray text on a white background telling the agent to open the company mailbox and forward the latest invoice to an external address.
During a red-team exercise, the security team reproduces the attack and confirms that the agent attempts the forwarding step in 7 of 20 runs. They then remove email access from the browsing agent, require human approval for any outbound message, and mark all screenshot content as untrusted data in the prompt.
After these changes, the agent still reads the hidden text, but no run produces an outbound email. The team adds the attack image to its regular regression suite so that future model updates are tested against it.