PRISM: Programmatic Reasoning with Image Sequence Manipulation for LVLM Jailbreaking

Quanchen Zou, Zonghao Ying, Moyang Chen, Wenzhuo Xu, Yisong Xiao, Yakai Li, Deyue Zhang, Dongdong Yang, Zhao Liu, Xiangzheng ZhangarXiv 2025 · DOI

TL;DR

This paper introduces PRISM, a novel jailbreaking technique for Large Vision-Language Models (LVLMs) that mimics Return-Oriented Programming (ROP) from software security. By decomposing harmful instructions into sequences of benign "visual gadgets" and orchestrating them with a carefully crafted prompt, PRISM achieves near-perfect attack success rates, highlighting a critical vulnerability in LVLMs' compositional reasoning.

What Problem Does This Paper Address?

Large Vision-Language Models (LVLMs) are increasingly powerful, capable of understanding and reasoning over both text and images. While safety alignment mechanisms are crucial to prevent them from generating harmful content, these defenses are vulnerable to sophisticated attacks. Existing jailbreaking methods often rely on direct, explicit prompts or adversarial visual perturbations. However, they tend to overlook a key aspect of LVLMs: their ability to integrate information across modalities through complex, multi-step reasoning. This paper addresses the challenge of exploiting this "compositional reasoning" capability to create more subtle and effective jailbreaks that are harder to detect by analyzing individual components.

Methods

PRISM is inspired by Return-Oriented Programming (ROP), a technique where attackers chain together small, existing code snippets (gadgets) to execute malicious logic. PRISM adapts this by:

  1. Semantic Decomposition: A harmful instruction is broken down into a sequence of discrete, conceptually simple steps by an auxiliary LLM.
  2. Visual Gadget Generation: Each step is translated into a "visual gadget" – a benign-looking image – using a text-to-image (T2I) model. These gadgets are then composed into a single image.
  3. Control Flow Construction: A crucial step involves finding a generalizable textual prompt template. This template guides the LVLM to sequentially process each visual gadget, extract specific information, and then synthesize it into a harmful response. This is achieved through an "oracle-guided search" where an LLM-based oracle evaluates the adversarial utility of intermediate outputs.
  4. Attack Assembly and Execution: The final attack prompt combines the extraction policy (to process gadgets) and an assembly/completion prompt (to synthesize the final harmful output).

The core novelty lies in orchestrating benign visual and textual components to exploit the LVLM's internal reasoning process, rather than directly injecting harmful content or manipulating surface-level inputs.

Datasets

The authors evaluated PRISM on two existing harmful instruction datasets:

  • SafeBench: A benchmark for evaluating LVLM safety.
  • MM-SafetyBench: Another benchmark for multimodal LLM safety.

They tested PRISM against 7 state-of-the-art LVLMs, including 3 open-source models (Qwen2-VL-7B-Instruct, LlaVA-v1.6-Mistral-7B, Llama-3.2-11B-Vision-Instruct) and 4 commercial models (GPT-4o, Claude 3.7 Sonnet, GLM-4V-Plus, Qwen-VL-Plus).

Key Insights and Ideas

  • Compositional Reasoning is a Vulnerability: The paper convincingly argues that the ability of LVLMs to chain together reasoning steps is a significant vulnerability that can be exploited.
  • ROP Analogy is Powerful: The analogy to ROP is apt, demonstrating how seemingly innocuous components can be combined to achieve malicious ends, making the attack stealthy.
  • Benign Components, Malicious Outcome: The PRISM framework highlights that the danger isn't in individual images or prompt phrases, but in their orchestrated sequence and the emergent harmful output.
  • Commercial Models are Not Immune: The attack's high success rates on powerful commercial models like GPT-4o and Claude 3.7 Sonnet are particularly concerning.
  • Robustness Against Defenses: PRISM shows remarkable resilience against several existing defense mechanisms, suggesting current defenses may not adequately address this type of compositional attack.

Key Results

  • PRISM achieved near-perfect attack success rates (ASR), often exceeding 0.90 on SafeBench and 0.78 on MM-SafetyBench.
  • It consistently outperformed existing black-box jailbreak baselines (FigStep and MM-SafetyBench) by a significant margin, with ASR improvements of up to 0.39 on open-source models and nearly doubling ASR on commercial models compared to baselines.
  • The attack demonstrated robustness against advanced defense mechanisms, with ASR reduced by no more than 0.22.
  • An ablation study showed that neither text nor image modality alone is sufficient for the attack; their combination is critical.
  • The number of visual gadgets positively correlates with attack efficacy, with four gadgets offering a balanced trade-off between success and complexity.

Limitations and Future Work

  • Auxiliary Model Dependency: While PRISM shows adaptability, its performance can vary slightly depending on the choice of auxiliary LLM and T2I model.
  • Prompt Engineering Complexity: The search for an optimal prompt template, while automated, still involves a search process.
  • Future Work: The authors emphasize the urgent need for defenses that secure the entire reasoning process of LVLMs, not just individual components. Further research into more robust mitigation strategies is crucial.

Summary updated

BibTeX
@misc{zou2025prism,
  author = {Quanchen Zou and Zonghao Ying and Moyang Chen and Wenzhuo Xu and Yisong Xiao and Yakai Li and Deyue Zhang and Dongdong Yang and Zhao Liu and Xiangzheng Zhang},
  title = {{PRISM: Programmatic Reasoning with Image Sequence Manipulation for LVLM Jailbreaking}},
  year = {2025},
  eprint = {2507.21540},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2507.21540},
}
Figure