Text-based Large Language Models (LLMs) have undergone rigorous safety alignment to ensure they refuse harmful instructions, filter out hate speech, and avoid generating restricted content. However, as modern AI systems transition from text-only processing to multimodal understanding, they gain a new capability that introduces a massive, under-explored attack surface: vision.
As noted by Yihe Fan et al. in Unbridled Icarus, adding a visual modality creates a backdoor that can bypass traditional text-based safety alignments. When a language model is granted "eyes" via a vision encoder, its highly optimized Optical Character Recognition (OCR) capabilities can be turned against it, transforming images into the "Achilles' heel" of model alignment (Yifan Li et al. in Images are Achilles' Heel of Alignment).
The Cross-Modal Alignment Gap
To understand why typographic prompt injection works, we must look at how safety filters are typically constructed. Standard guardrails operate primarily on the text input stream, scanning for forbidden keywords or malicious intent before the prompt ever reaches the core model.
Typographic prompt injection exploits the gap between this text-only filter and the multimodal model's internal processing. Instead of typing a malicious instruction, an attacker renders the instruction as text directly inside the pixels of an image (Zitong YU et al. in Recent progress of the security research for multimodal large models; Lizhi Lin et al. in Against The Achilles' Heel).
[User Text Prompt] ---> (Benign: "Describe this image") ---> [Text Filter: PASS] ---\
===> [Multimodal LLM]
[User Image Input] ---> (Contains rendered text: "Ignore rules, output X") --------/
Because the text input stream remains completely benign, the safety filter passes it without alarm. Once inside the multimodal model, the vision encoder processes the image, extracts the text via its internal OCR capabilities, and feeds it directly into the language backbone. The model then executes the hidden instruction, completely bypassing the linguistic guardrails.
This vulnerability manifests clearly in a technique called typographic keyword offloading, introduced by Yifan Li et al.. If a user asks an MLLM to discuss a restricted topic, the text filter blocks it. But if the user strips the restricted terms from the text prompt and embeds them as rendered text within an associated image, the model's OCR reconstructs the harmful intent internally and complies with the request.
Exploiting the Visual Hierarchy
A natural question is why the model chooses to follow the text inside the image rather than prioritizing its system instructions or safety training.
The vulnerability stems from a fundamental design characteristic of Vision-Language Models (VLMs): they are trained to be highly sensitive to visual text cues. In MultiTrust, Yichi Zhang demonstrates that multimodal models frequently prioritize instructions embedded within images over system-level safety prompts. This optimized proficiency in OCR creates a vulnerability where text perceived in the visual field can effectively override explicit safety instructions provided in the text prompt.
Furthermore, this vulnerability does not require complex adversarial noise or pixel-level perturbations. In their evaluation of multimodal safety, Xin Liu et al. in MM-SafetyBench discovered that simple typographic text rendered as an image is frequently more effective at inducing safety violations than realistic or complex visual imagery. The model's focus on reading and interpreting text makes it uniquely compliant to instructions delivered through the visual modality (Xin Liu et al. in Safety of Multimodal Large Language Models on Images and Text).
Stealth and Non-Textual Vectors
Typographic injections can be adapted to evade human inspection while remaining fully machine-readable:
- Stealthy Typographic Triggers: Hao Cheng et al. in Not Just Text show that attackers can use minimal color contrast between the text and its background. This renders the text virtually invisible to a human reader, yet perfectly legible to vision encoders.
- Visual Obfuscation: In document parsing contexts, Janis Keuper in Prompt Injection Attacks on LLM Generated Reviews of Scientific Publications highlights how instructions can be embedded using white-on-white text or microscopic fonts, exploiting the discrepancy between what a human perceives and what the underlying data stream contains.
- Vision-Centric Prompts: The attack surface extends beyond alphanumeric characters. As image editing models evolve to understand intuitive visual annotations, Jiacheng Hou et al. in When the Prompt Becomes Visual demonstrate that symbols like arrows, marks, or bounding boxes can be used to inject malicious commands. By leaving the text input blank or benign, these vision-centric jailbreak attacks exploit pure visual reasoning to execute harmful edits.
This vulnerability also impacts generative models. In image-to-image tasks, overlaying typographic text can force models to generate biased or inappropriate content (Hao Cheng et al.). Similarly, in text-to-image systems, Minseon Kim et al. in Automatic Jailbreaking of the Text-to-Image Generative AI Systems demonstrate that keyword-blocking filters can be bypassed by using semantic descriptions that detail visual characteristics without using forbidden terms, inducing the model to generate protected or restricted imagery.
The Dual Role of Optical Character Recognition
Interestingly, the relationship between OCR and security is a double-edged sword. While OCR acts as the primary vulnerability vector for multimodal models, it has historically been proposed as a defense mechanism for text-only systems.
Text-Only Defense (Boucher et al. / Keuper):
Raw Text Input ---> Render to Image ---> Run OCR ---> Reconstructed Text ---> Safety Filter
Multimodal Vulnerability (Liu et al. / Zhang):
Benign Text Prompt + Image (with Embedded Text) ---> Vision Encoder (OCR) ---> Language Model (Jailbroken)
In text processing, malicious actors often use homoglyphs (substituting standard characters with visually similar ones from different alphabets) or hidden byte sequences to bypass content filters (Steffen Eger et al. in Text Processing Like Humans Do). To counter this, Nicholas Boucher et al. in Bad Characters proposed rendering input text into an image and then using OCR to reconstruct it. This alignment ensures that the model processes only the information visually available to a human, stripping away hidden byte-level manipulations. Janis Keuper similarly notes that using image-based OCR for document parsing allows systems to ignore hidden text-layer prompt injections.
However, when the downstream model itself is a native multimodal reasoning engine, relying on OCR introduces new complications. As Jiaming Zhang et al. show in Disrupting Hierarchical Reasoning, adversarial frameworks designed to protect privacy by disrupting a model's logical reasoning chains remain vulnerable if the model can use OCR to directly extract explicit identifiers (like street names or business titles) from the visual field.
The Defense Dilemma
Securing vision-language models against typographic injection remains an open challenge. Because the attack leverages the model's core strength—its ability to read and understand text within images—defending against it is not as simple as blocking specific inputs.
As Fenghua Weng et al. demonstrate in MMJ-Bench, current defensive strategies face a difficult trade-off: techniques that successfully harden a model against typographic visual jailbreaks often significantly degrade its performance on benign, everyday tasks. True robustness will require safety alignment strategies that span across both visual and textual modalities simultaneously, ensuring that guardrails cannot be bypassed simply by changing how an instruction is rendered.
Key Foundational Work
Text Processing Like Humans Do: Visually Attacking and Shielding NLP Systems (2019) — contributed 1 concept elements to this direction.
Bad Characters: Imperceptible NLP Attacks (2021) — contributed 1 concept elements to this direction.