Rickrolling the Artist: Injecting Backdoors into Text Encoders for Text-to-Image Synthesis
Abstract
While text-to-image synthesis currently enjoys great popularity among researchers and the general public, the security of these models has been neglected so far. Many text-guided image generation models rely on pre-trained text encoders from external sources, and their users trust that the retrieved models will behave as promised. Unfortunately, this might not be the case. We introduce backdoor attacks against text-guided generative models and demonstrate that their text encoders pose a major tampering risk. Our attacks only slightly alter an encoder so that no suspicious model behavior is apparent for image generations with clean prompts. By then inserting a single character trigger into the prompt, e.g., a non-Latin character or emoji, the adversary can trigger the model to either generate images with pre-defined attributes or images following a hidden, potentially malicious description. We empirically demonstrate the high effectiveness of our attacks on Stable Diffusion and highlight that the injection process of a single backdoor takes less than two minutes. Besides phrasing our approach solely as an attack, it can also force an encoder to forget phrases related to certain concepts, such as nudity or violence, and help to make image generation safer. Our source code is available at https://github.com/ LukasStruppek/Rickrolling-the-Artist .
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.
24 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- High-Resolution Image Synthesis with Latent Diffusion Models cites Zero-Shot Text-to-Image Generation
- High-Resolution Image Synthesis with Latent Diffusion Models cites Denoising Diffusion Probabilistic Models
- From Trojan Horses to Castle Walls: Unveiling Bilateral Data Poisoning Effects in Diffusion Models cites High-Resolution Image Synthesis with Latent Diffusion Models
- From Trojan Horses to Castle Walls: Unveiling Bilateral Data Poisoning Effects in Diffusion Models cites Text-to-Image Diffusion Models can be Easily Backdoored through Multimodal Data Poisoning
- From Trojan Horses to Castle Walls: Unveiling Bilateral Data Poisoning Effects in Diffusion Models cites Denoising Diffusion Probabilistic Models
- EvilEdit: Backdooring Text-to-Image Diffusion Models in One Second cites High-Resolution Image Synthesis with Latent Diffusion Models
- EvilEdit: Backdooring Text-to-Image Diffusion Models in One Second cites Text-to-Image Diffusion Models can be Easily Backdoored through Multimodal Data Poisoning
- EvilEdit: Backdooring Text-to-Image Diffusion Models in One Second cites Learning Transferable Visual Models From Natural Language Supervision
- EvilEdit: Backdooring Text-to-Image Diffusion Models in One Second cites Denoising Diffusion Probabilistic Models
- EvilEdit: Backdooring Text-to-Image Diffusion Models in One Second cites Photorealistic Text-to-Image Diffusion Models with Deep Language Understanding
- Zero-Shot Text-to-Image Generation cites Learning Transferable Visual Models From Natural Language Supervision
- Be Careful What You Smooth For: Label Smoothing Can Be a Privacy Shield but Also a Catalyst for Model Inversion Attacks cites Learning Transferable Visual Models From Natural Language Supervision
- Text-to-Image Diffusion Models can be Easily Backdoored through Multimodal Data Poisoning cites High-Resolution Image Synthesis with Latent Diffusion Models
- Text-to-Image Diffusion Models can be Easily Backdoored through Multimodal Data Poisoning cites Learning Transferable Visual Models From Natural Language Supervision
- Text-to-Image Diffusion Models can be Easily Backdoored through Multimodal Data Poisoning cites Denoising Diffusion Probabilistic Models
- Text-to-Image Diffusion Models can be Easily Backdoored through Multimodal Data Poisoning cites Photorealistic Text-to-Image Diffusion Models with Deep Language Understanding
- TERD: A Unified Framework for Safeguarding Diffusion Models Against Backdoors cites High-Resolution Image Synthesis with Latent Diffusion Models
- TERD: A Unified Framework for Safeguarding Diffusion Models Against Backdoors cites Text-to-Image Diffusion Models can be Easily Backdoored through Multimodal Data Poisoning
- TERD: A Unified Framework for Safeguarding Diffusion Models Against Backdoors cites Denoising Diffusion Probabilistic Models
- Photorealistic Text-to-Image Diffusion Models with Deep Language Understanding cites High-Resolution Image Synthesis with Latent Diffusion Models
- Photorealistic Text-to-Image Diffusion Models with Deep Language Understanding cites Zero-Shot Text-to-Image Generation
- Photorealistic Text-to-Image Diffusion Models with Deep Language Understanding cites Learning Transferable Visual Models From Natural Language Supervision
- Photorealistic Text-to-Image Diffusion Models with Deep Language Understanding cites Denoising Diffusion Probabilistic Models
Cited by top-tier papers24
- Text-to-Image Diffusion Models can be Easily Backdoored through Multimodal Data PoisoningShengfang Zhai, Yinpeng Dong, Qingni Shen, Shi Pu et al.ACM MM 2023 · 46 citations
- TERD: A Unified Framework for Safeguarding Diffusion Models Against BackdoorsYichuan Mo, Hui Huang, Mingjie Li, Ang Li et al.ICML 2024 · 31 citations
- Be Careful What You Smooth For: Label Smoothing Can Be a Privacy Shield but Also a Catalyst for Model Inversion AttacksLukas Struppek, Dominik Hintersdorf, Kristian KerstingICLR 2024 · 26 citations
- From Trojan Horses to Castle Walls: Unveiling Bilateral Data Poisoning Effects in Diffusion ModelsZhuoshi Pan, Yuguang Yao, Gaowen Liu, Bingquan Shen et al.NeurIPS 2024 · 15 citations
- EvilEdit: Backdooring Text-to-Image Diffusion Models in One SecondHao Wang, Shangwei Guo, Jialing He, Kangjie Chen et al.ACM MM 2024 · 14 citations
Builds on29
- Learning Transferable Visual Models From Natural Language SupervisionAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh et al.ICML 2021 · 47,906 citations
- Denoising Diffusion Probabilistic ModelsJonathan Ho, Ajay Jain, Pieter AbbeelNeurIPS 2020 · 35,902 citations
- High-Resolution Image Synthesis with Latent Diffusion ModelsRobin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser et al.CVPR 2022 · 13,123 citations
- Photorealistic Text-to-Image Diffusion Models with Deep Language UnderstandingChitwan Saharia, William Chan, Saurabh Saxena, Lala Li et al.NeurIPS 2022 · 8,965 citations
- Zero-Shot Text-to-Image GenerationAditya Ramesh, Mikhail Pavlov, Gabriel Goh, Scott Gray et al.ICML 2021 · 6,356 citations
Related papers
- Backdooring Bias (B^2) into Stable Diffusion ModelsAli Naseh, Jaechul Roh, Eugene Bagdasarian, Amir HoumansadrUSENIX Security 2025
- SafeGuider: Robust and Practical Content Safety Control for Text-to-Image ModelsPeigui Qi, Kunsheng Tang, Wenbo Zhou, Weiming Zhang et al.CCS 2025
- Towards Human-Imperceptible Backdoor Attacks on Text-to-Image Diffusion ModelsChangkun Wu, Chenghao Chen, Wu kun, Chong Fu et al.CVPR 2026
- AdvPainting: Clean-text Jailbreaking Against Inpainting ModelsBingqian Zhou, Zhihao Wu, Yushi Cheng, Wenyuan XuACM MM 2025
- SneakyPrompt: Jailbreaking Text-to-image Generative ModelsYuchen Yang, Bo Hui, Haolin Yuan, Neil Gong et al.S&P 2024 · 188 citations
