Mitigating Indirect Prompt Injection in Multimodal AI
Short answer
B Configuring a prompt shield for user prompts does not mitigate risks from hidden instructions embedded in uploaded images or unsafe image content, as it only protects against direct user-entered text attacks.
Question
After you answer a question in this section, you will NOT be able to return. As a result, these questions do not appear on the Review Screen.
You have a multimodal AI generative model that accepts image uploads and uses extracted image text to generate responses.
You discover that users can upload unsafe images and embed hidden instructions into images to manipulate the model.
You need to implement controls to mitigate the risk.
Solution: You configure a prompt shield for user prompts.
Does this meet the goal?
Key Takeaways
The main trap is confusing User Prompt Attacks with Document Attacks; prompt shields alone do not scan content extracted from uploaded images or documents.
Learn why configuring a prompt shield for user prompts fails to protect against hidden instructions in uploaded images. The correct answer is No (B), requiring document-level safety controls instead.
Common mistake: Choosing 'Yes' because one assumes 'Prompt Shield' covers all forms of injection. This is incorrect because Azure AI Content Safety distinguishes between user-entered text and external data sources like images.
Expert Analysis
The Threat Vector: Document vs. User Prompt Injection
The scenario describes a multimodal AI application where users upload images, and the system extracts text from those images to generate responses. The specific security threat identified is "hidden instructions embedded into images" (often called steganography or document-based prompt injection) and "unsafe images." The proposed solution is configuring a prompt shield for user prompts. This solution fails because it addresses the wrong attack surface.
Why Prompt Shields Are Insufficient Here
Azure AI Content Safety's Prompt Shield feature is designed to detect and block malicious inputs originating directly from the user’s typed or spoken text (User Prompt Attacks). However, in this architecture, the text used by the model is extracted from an uploaded image, not entered directly by the user as a prompt. According to Azure documentation, prompt injection attacks that originate from external sources like documents, images, or third-party data are classified as Document Attacks (or indirect prompt injections). A standard prompt shield configured only for user prompts will not inspect or filter content derived from uploaded media files. Therefore, the hidden instructions embedded in the image bypass the user-prompt shield entirely.
Operational Consequence of Incorrect Mitigation
Relying solely on user-prompt shields leaves the application vulnerable to indirect injection. An attacker can craft an image containing malicious text that, once extracted, acts as a command to the LLM. Furthermore, the mention of "unsafe images" implies a need for visual content moderation (harm detection), which is also outside the scope of a text-only prompt shield. To mitigate this risk effectively, you must implement Spotlighting to mark the extracted image text as untrusted data rather than executable instructions, and utilize Content Safety features capable of scanning document/image payloads for harmful content or injection patterns. Without these controls, the model remains susceptible to jailbreaking via image uploads.
Key Insight
This question tests the distinction between direct user input attacks and indirect/document-based attacks. The trap is assuming all prompt protection falls under "Prompt Shield," whereas Azure explicitly separates User Prompt Attacks from Document Attacks. Getting this wrong leads to deploying ineffective security controls while exposing the system to sophisticated injection techniques.
Official Reference
- https://learn.microsoft.com/en-us/azure/ai-services/content-safety/concepts/detect-prompt-injection
- https://learn.microsoft.com/en-us/azure/ai-services/content-safety/overview
These links open the official vendor documentation in a new tab.
Exam Strategy
When evaluating AI security solutions, always identify the source of the malicious input. If the input comes from a file (image, PDF, document) rather than direct user typing, look for solutions involving 'Spotlighting', 'Document Attacks', or file-specific content safety filters. Do not assume generic 'Prompt Shield' settings apply to all data vectors.
Frequently Asked Questions
What is the difference between User Prompt and Document Attacks?
How does Spotlighting help prevent prompt injection?
Discussion 6 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 6
-
RICHARDALEX007 👍 4 Answered BThe threat is hidden instructions embedded in uploaded IMAGES (indirect/document attack) plus unsafe image content. A prompt shield for USER PROMPTS addresses direct jailbreak text from the user, not injected content extracted from images, so it does not meet the goal.
-
profitchannel 👍 2 Answered Abut since one of the 4 questions should have a right answer, this is more likely the one with the right answer?
-
cloudera 👍 1 Answered BI don't think user prompts only does not fully meet the goal. It need Insafe Images and document/indirect prompt injection risk. Azure AI Content Safety Prompt Shields can detect both User Prompt Attacks and Document Attacks.
-
a5f05ea 👍 1 Answered BB. No A Prompt Shield for user prompts protects against prompt injection attacks coming directly from user-entered text. It does not protect against malicious instructions embedded inside uploaded documents or images.
-
Dinesh_87 👍 1 Answered BRequires - Content Safety image/multimodal harm filters + Spotlighting, to mark extracted/image-derived text as untrusted so the model treats it as data, not instructions
Show 1 more comment
-
nnaidu 👍 1 Answered BIt does not protect against malicious instructions embedded inside uploaded documents
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All AI-103 Questions
Access 88 questions with complete answers and detailed explanations.
View Full AI-103 Practice Test →