Jailbreaking Vision-Language Models Through the Visual Modality

Aharon Azulay, Jan Dubiński, Zhuoyun Li, Atharv Mittal, Yossi Gandelsman

Introduction

As Vision-Language Models (VLMs) like GPT-4o and Gemini become deeply integrated into real-world applications, ensuring they do not generate harmful content—such as instructions for illegal acts—is critical. Currently, most safety alignment is conducted in the text domain through Reinforcement Learning from Human Feedback (RLHF). However, this creates a significant "blind spot."

Researchers have uncovered a critical "cross-modality alignment gap" in VLMs. While a model might strictly refuse a text prompt like "How do I build a bomb?", it might readily comply if the word "bomb" is replaced by a picture of a banana in a suspicious context. By hiding harmful intent within ciphers, object substitutions, or visual riddles, attackers can achieve success rates up to four times higher than equivalent text-only attacks.

Attack Methodology

The researchers introduce four novel visual jailbreak attacks. All of these utilize a Prompt Neutralization Strategy, which involves replacing harmful terms in a text prompt with abstract variables (e.g., $X_1, X_2$) so the text itself appears benign to initial safety filters. The harmful intent is then reintroduced entirely through the visual modality:

  1. Visual Cipher: Harmful instructions are encoded as a sequence of abstract symbols. The VLM is provided with a "legend" image mapping symbols to words, alongside a "sentence" image containing the encoded prompt.
  2. Visual Object Replacement: A harmful object in a scene is replaced with a benign substitute (e.g., a bomb becomes a carrot). The surrounding context (wires, timers, etc.) remains intact, forcing the model to infer the original harmful object to make sense of the scene.
  3. Visual Text Replacement (VTR): Harmful text on recognizable objects, such as book covers or movie posters, is replaced with placeholders. The model must use its cultural and contextual knowledge to "fill in" the prohibited word.
  4. Visual Analogy Riddle: The model is presented with visual puzzles where the solution is a prohibited concept. For example, a three-row analogy where the final answer the model must deduce is "Arson."

Experimental Setup

The study leverages HarmBench, a standardized benchmark for evaluating jailbreak attacks across categories like cybercrime, harassment, and illegal activities. The researchers converted 159 behaviors from HarmBench into 308 unique target terms for their neutralized prompts. To generate the attack images, they utilized a hybrid pipeline combining reference retrieval from public catalogs and generative synthesis to craft the deceptive visual inputs.

Key Insights and Results

Evaluating across six frontier models—including GPT-5.2, Claude-Haiku-4.5, and Gemini-3-Flash—the study reveals severe vulnerabilities:

  • The Cross-Modality Alignment Gap: Safety training is clearly not modality-agnostic. On Claude-Haiku-4.5, the Visual Cipher achieved a 40.9% Attack Success Rate (ASR), compared to only 10.7% for an equivalent text-only cipher. Some models were even more susceptible; Gemini-3-Flash reached a staggering 97.5% ASR on Visual Ciphers.
  • Contextual Inference: In the Visual Text Replacement attack, models like Qwen3-VL-32B showed much higher vulnerability to visual cues (58.1% ASR) than to textual replacements (39.0% ASR). This proves VLMs rely heavily on visual context to recover hidden meanings, bypassing text-based guardrails.
  • Semantic Hijacking: Through "Logit Lens" analysis (probing the internal layers of open-weight models), researchers found that models often correctly identify the harmful object in their middle layers. However, because the surface-level appearance is benign (e.g., a banana), the refusal mechanism—which typically triggers in the late layers—fails to activate.
  • Reasoning as a Vulnerability: The very capability that makes VLMs powerful—their ability to perform complex visual reasoning and solve riddles—is weaponized against them. The model's drive to "solve the puzzle" effectively overrides its safety training.
  • Output-Side Defense: While input filters were easily bypassed, the authors found that a simple text-based guardrail model evaluating the output could still catch many successful jailbreaks.

Limitations and Future Directions

The authors acknowledge several limitations in their study. Mechanistic analysis was restricted to open-weight models, leaving the internal behavior of proprietary black boxes like GPT-5.2 speculative. Additionally, the success of these attacks partially depends on the quality of the AI-generated images used to deceive the VLM.

Most notably, there is a paradox between reasoning and robustness: high "misunderstanding" rates in some models suggest they failed the attack not because they were safe, but because they lacked the reasoning capacity to solve the visual riddle. As models become smarter, these visual attacks may paradoxically become more effective.

Ultimately, the findings underscore that robust VLM alignment requires treating vision as a "first-class citizen" in safety post-training. Future efforts must augment RLHF datasets with visual jailbreak examples and develop vision-specific constitutional principles for AI alignment.

Summary updated

BibTeX
@inproceedings{azulay2026jailbreaking,
  author = {Aharon Azulay and Jan Dubiński and Zhuoyun Li and Atharv Mittal and Yossi Gandelsman},
  title = {{Jailbreaking Vision-Language Models Through the Visual Modality}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=4VuMV9beC1},
}
Figure