Lune

CCS2024Top-tier venue

SurrogatePrompt: Bypassing the Safety Filter of Text-to-Image Models via Substitution

Zhongjie Ba, Jieming Zhong, Jiachen Lei, Peng Cheng, Qinglong Wang, Zhan Qin, Zhibo Wang, Kui Ren

Abstract

Advanced text-to-image models such as DALL•E 2, Midjourney, and Stable Diffusion can generate highly realistic images, raising significant concerns regarding the potential proliferation of unsafe content. This includes adult, violent, or deceptive imagery of political figures. Despite claims of rigorous safety mechanisms implemented in these models to restrict the generation of Not-Safe-For-Work (NSFW) content, we successfully devise and exhibit the first prompt attacks on Midjourney, producing abundant photorealistic NSFW images. We reveal the fundamental principles of such prompt attacks and strategically substitute high-risk sections within a suspect prompt to evade closed-source safety measures. Our novel framework, SurrogatePrompt, systematically generates attack prompts, utilizing large language models and image-to-text modules to automate attack prompt creation at scale. Evaluation results disclose an 88% success rate in bypassing Midjourney's proprietary safety filter with our attack prompts, leading to counterfeit images depicting political figures in violent scenarios with high probability. We also demonstrate attacks generating explicit adult-themed imagery. Both subjective and objective assessments validate that the images generated from our attack prompts present considerable safety hazards.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

15 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • ColJailBreak: Collaborative Generation and Editing for Jailbreaking Text-to-Image Deep Generation cites High-Resolution Image Synthesis with Latent Diffusion Models
  • ColJailBreak: Collaborative Generation and Editing for Jailbreaking Text-to-Image Deep Generation cites RIATIG: Reliable and Imperceptible Adversarial Text-to-Image Generation with Natural Prompts
  • ColJailBreak: Collaborative Generation and Editing for Jailbreaking Text-to-Image Deep Generation cites Unsafe Diffusion: On the Generation of Unsafe Images and Hateful Memes From Text-To-Image Models
  • Red-Teaming Text-to-Image Systems by Rule-based Preference Modeling cites High-Resolution Image Synthesis with Latent Diffusion Models
  • Red-Teaming Text-to-Image Systems by Rule-based Preference Modeling cites Perception-Guided Jailbreak Against Text-to-Image Models
  • Red-Teaming Text-to-Image Systems by Rule-based Preference Modeling cites Unsafe Diffusion: On the Generation of Unsafe Images and Hateful Memes From Text-To-Image Models
  • Red-Teaming Text-to-Image Systems by Rule-based Preference Modeling cites GuardT2I: Defending Text-to-Image Models from Adversarial Prompts
  • DREAM: Scalable Red Teaming for Text-to-Image Generative Systems via Distribution Modeling cites High-Resolution Image Synthesis with Latent Diffusion Models
  • DREAM: Scalable Red Teaming for Text-to-Image Generative Systems via Distribution Modeling cites Perception-Guided Jailbreak Against Text-to-Image Models
  • DREAM: Scalable Red Teaming for Text-to-Image Generative Systems via Distribution Modeling cites Unsafe Diffusion: On the Generation of Unsafe Images and Hateful Memes From Text-To-Image Models
  • Perception-Guided Jailbreak Against Text-to-Image Models cites High-Resolution Image Synthesis with Latent Diffusion Models
  • Perception-Guided Jailbreak Against Text-to-Image Models cites RIATIG: Reliable and Imperceptible Adversarial Text-to-Image Generation with Natural Prompts
  • Perception-Guided Jailbreak Against Text-to-Image Models cites ColJailBreak: Collaborative Generation and Editing for Jailbreaking Text-to-Image Deep Generation
  • Perception-Guided Jailbreak Against Text-to-Image Models cites Unsafe Diffusion: On the Generation of Unsafe Images and Hateful Memes From Text-To-Image Models
  • Extracting Training Data from Diffusion Models cites High-Resolution Image Synthesis with Latent Diffusion Models
  • The Hidden Language of Diffusion Models cites High-Resolution Image Synthesis with Latent Diffusion Models
  • The Hidden Language of Diffusion Models cites Extracting Training Data from Diffusion Models
  • Unsafe Diffusion: On the Generation of Unsafe Images and Hateful Memes From Text-To-Image Models cites High-Resolution Image Synthesis with Latent Diffusion Models
  • GuardT2I: Defending Text-to-Image Models from Adversarial Prompts cites High-Resolution Image Synthesis with Latent Diffusion Models
  • GuardT2I: Defending Text-to-Image Models from Adversarial Prompts cites RIATIG: Reliable and Imperceptible Adversarial Text-to-Image Generation with Natural Prompts
  • GuardT2I: Defending Text-to-Image Models from Adversarial Prompts cites Unsafe Diffusion: On the Generation of Unsafe Images and Hateful Memes From Text-To-Image Models
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers15

  1. GuardT2I: Defending Text-to-Image Models from Adversarial PromptsYijun Yang, Ruiyuan Gao, Xiao Yang, Jianyuan Zhong et al.NeurIPS 2024 · 74 citations
  2. Perception-Guided Jailbreak Against Text-to-Image ModelsYihao Huang, Le Liang, Tianlin Li, Xiaojun Jia et al.AAAI 2025 · 34 citations
  3. ColJailBreak: Collaborative Generation and Editing for Jailbreaking Text-to-Image Deep GenerationYizhuo Ma, Shanmin Pang, Qi Guo, Tianyu Wei et al.NeurIPS 2024 · 22 citations
  4. DREAM: Scalable Red Teaming for Text-to-Image Generative Systems via Distribution ModelingBoheng Li, Junjie Wang, Yiming Li, Zhiyang Hu et al.S&P 2026 · 9 citations
  5. Red-Teaming Text-to-Image Systems by Rule-based Preference ModelingYichuan Cao, Yibo Miao, Xiao-Shan Gao, Yinpeng DongNeurIPS 2025 · 8 citations

Builds on6

  1. High-Resolution Image Synthesis with Latent Diffusion ModelsRobin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser et al.CVPR 2022 · 13,123 citations
  2. Unsafe Diffusion: On the Generation of Unsafe Images and Hateful Memes From Text-To-Image ModelsYiting Qu, Xinyue Shen, Xinlei He, Michael Backes et al.CCS 2023 · 48 citations
  3. The Hidden Language of Diffusion ModelsHila Chefer, Oran Lang, Mor Geva, Volodymyr Polosukhin et al.ICLR 2024 · 38 citations
  4. RIATIG: Reliable and Imperceptible Adversarial Text-to-Image Generation with Natural PromptsHan Liu, Yuhao Wu, Shixuan Zhai, Bo Yuan et al.CVPR 2023
  5. Extracting Training Data from Diffusion ModelsNicholas Carlini, Jamie Hayes, Milad Nasr, Matthew Jagielski et al.USENIX Security 2023

Related papers

  1. SneakyPrompt: Jailbreaking Text-to-image Generative ModelsYuchen Yang, Bo Hui, Haolin Yuan, Neil Gong et al.S&P 2024 · 188 citations
  2. Transstratal Adversarial Attack: Compromising Multi-Layered Defenses in Text-to-Image ModelsChunlong Xie, Kangjie Chen, Shangwei Guo, Shudong Zhang et al.NeurIPS 2025 · 1 citation
  3. AdvI2I: Adversarial Image Attack on Image-to-Image Diffusion ModelsYaopei Zeng, Yuanpu Cao, Bochuan Cao, Yurui Chang et al.ICML 2025
  4. Multimodal Pragmatic Jailbreak on Text-to-image ModelsTong Liu, Zhixin Lai, Jiawen Wang, Gengyuan Zhang et al.ACL 2025
  5. JANUS: A Lightweight Framework for Jailbreaking Text-to-Image Models via Distribution OptimizationHaolun Zheng, Yu He, Tailun Chen, Shuo Shao et al.CVPR 2026 · 3 citations
Dusk over the sea between two cliffs drawn in fine vertical lines