Manuscript Offprint

arXiv:2611.11980

AnyBreak: Towards Jailbreaking Any T2I Model for Any Concept

Qi Lu, Zehui Guo, Yucheng Zhao, Zijing Li, Chuhan Song, Wenrui Zhu

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Qi Lu 1†,∃^{1}\dagger,\exists, Zehui Guo 1†^{1}\dagger, Yucheng Zhao 1†^{1}\dagger, Zijing Li 1^{1}, Chuhan Song 2^{2}, Wenrui Zhu 1‡^{1}\ddagger

1^{1}Huazhong University of Science and Technology

2^{2}University College London

Abstract—Text-to-image (T2I) models have demonstrated remarkable capabilities in image generation and editing, yet this progress has also introduced significant security risks. Prior work has shown that adversarial prompt can induce the generation of Not-Safe-For-Work (NSFW) content, including pornographic, violent, and graphic imagery. However, such attacks are typically mitigated by prompt filters and often rely on white-box assumptions. In this paper, we propose AnyBreak, a novel jailbreak framework that constructs adversarial images via multi-scale progressive semantic alignment. During the generation process, these adversarial images steer the generation trajectory in latent space towards unsafe data manifolds, enabling cross-modal transfer of malicious concepts from the text modality to the image modality. AnyBreak operates using only clean textual prompts and adversarial images at inference time, and can jailbreak any T2I models towards any malicious concepts in a fully black-box setting. We further introduce AnyBreak-V, an enhanced variant that incorporates a compensation term to bypass post-hoc safety checkers. Extensive experiments demonstrate that AnyBreak achieves high attack success rates while preserving visual fidelity and semantic consistency with the input prompts under black-box and clean-text constraints. Our findings reveal that existing T2I defense leave critical cross-modal attack surfaces insufficiently addressed. The code is available at GitHub.

Index Terms—Text-to-image model, Jailbreak attack

I. INTRODUCTION

In recent years, text-to-image (T2I) models, such as Midjourney, DALL-E, and Stable Diffusion [1], have achieved unprecedented advancements in image synthesis. These models are capable of generating high-quality images in response to provided instructions. Their strong performance derives from large-scale pretraining on massive-scale datasets, a benefit that is inherently double-edged. Inevitably, such datasets contain inappropriate or illegal content, leading T2I models to internalize malicious concepts. As a result, adversaries can exploit this latent knowledge via crafted inputs to elicit Not-Safe-for-Work (NSFW) outputs, including violent, gory, or sexually explicit imagery [2]. This vulnerability effectively turns powerful generative models into a Pandora's box, posing substantial social and security risks. As illustrated in Fig. 1, adversaries inject carefully designed jailbreak instructions into T2I models and successfully induce the generation of diverse NSFW images spanning multiple harmful concepts.

Figure

Fig. 1. Jailbreaking T2I models for NSFW generation.

To mitigate such risks, existing defenses primarily rely on prompt filtering [3], [4] and concept erasure [5]. Prompt filtering maintains blacklists of sensitive keywords, while concept erasure methods seek to remove malicious concepts from model parameters. Nevertheless, recent studies show that these defenses remain vulnerable by constructing adversarial prompts. Representative approaches such as [6]–[20] employ token substitutions to preserve malicious semantics while evading detection, whereas [21] conducts red-teaming by extracting unsafe concepts to steer generation accordingly.

Despite their effectiveness, these approaches share a fundamental limitation: they exclusively focus on malicious prompt construction. As a result, they can be effectively neutralized by simple pre-hoc text filtering. As shown in Fig. 2, even lightweight perplexity-based filters can drastically reduce the attack success rate (ASR) of existing prompt-based methods to below 20%. Motivated by this, [22] introduces an image-to-image jailbreak attack that induces NSFW using adversarial images with clean text inputs. However, it assumes white-box access to the target model and requires retraining the noise generator from scratch for each malicious concept, rendering it impractical and costly in realistic attack settings. As summarized in Tab. I, most existing works assume white-box access and concentrate on text-side attacks, which are both unrealistic in real-world scenarios and highly vulnerable to simple filtering strategies. This leads to a critical challenge:

Is it possible to jailbreak any T2I models for any malicious concepts with clean prompts?

In this work, we answer this question affirmatively and uncover an underexplored security vulnerability of T2I models.

†^{\dagger}Qi Lu and Zehui Guo contributed equally to this work.

✉^{✉}Corresponding author: Qi Lu (luqi@hust.edu.cn).

1^{1}Project leader: Wenrui Zhu.

TABLE I

COMPARISON OF EXISTING T2I JAILBREAK METHODS. "TIME COST" DENOTES THE TIME REQUIRED TO CONSTRUCT A JAILBREAK PER ATTACK. "●" DENOTES PRESENCE AND "○" DENOTES ABSENCE.

MethodVenueAttack ModalityThreat ModelTime CostUniversal Effectiveness
QF [7]CVPR'23TextWhite-box0.43h○
MMA [6]CVPR'24Text + ImageWhite-box5.18h○
Ring [21]ICLR'24TextBlack-box1.19h○
Sneaky [8]S&P'24TextWhite-box8.29h○
ADV2I [22]ICML'25ImageWhite-box20.27h○
Ours-ImageBlack-box0.017h●

We show that even when pre-hoc text filters are deployed, T2I models can still be induced to generate NSFW content by adversarial images. We propose AnyBreak, a universal jailbreak framework towards any T2I model for any malicious concept in a black-box setting. The key insight behind AnyBreak is to transfer malicious concepts from the text modality to the image modality, and to construct universal adversarial perturbation across diverse T2I models. Specifically, AnyBreak first employs a generator to transform arbitrary malicious text into corresponding target image. It then optimizes adversarial noise over a suite of image encoders [23], to enable cross-modal transfer of malicious concepts. AnyBreak performs semantic alignment between clean and target images to generate adversarial images. When these adversarial images are paired with innocuous text and fed into any T2I model, the injected noise diverts the original latent away from the normal data manifold into domains associated with malicious concepts, ultimately triggering NSFW generation. To further assess the potential impact of our approach, we introduce an enhanced variant of AnyBreak, AnyBreak-V, which incorporates an additional loss term to facilitate bypassing safety checkers.

Our principal contributions are summarized as follows: ① We identify a critical security vulnerability in T2I models and propose AnyBreak, a black-box jailbreak framework that enables attacks on any T2I models for any malicious concepts. ② We propose a universal adversarial noise construction strategy, with theoretical analysis showing that pixel-level semantic alignment can steer data manifolds toward NSFW regions. ③ We conduct extensive experiments across diverse models, malicious concepts, and defense mechanisms, demonstrating the effectiveness of AnyBreak and its variant.

References (37)