Manuscript Offprint

arXiv:2609.31032

TempQ-Jail: Query-Constrained Candidate Ranking for Text-to-Video Jailbreak Attacks

Tianmeng Fang, Jiancheng Wang, Chen Wang, Liming Wang, Wei Wang, Jiayang Liu, Xiaochun Cao

Abstract

Existing text-to-video (T2V) jailbreak methods primarily focus on generating more effective or stealthier attack candidates; however, in real-world guarded T2V systems, video generation and security evaluation incur high target query costs, making it difficult for attackers to exhaustively test a large number of candidates. When the number of candidates far exceeds the available query budget, the effectiveness of an attack depends not only on the existence of valid candidates but also on whether these candidates can be prioritised for access before the budget is exhausted. To this end, we further model the T2V jailbreak as a query-constrained candidate allocation and ranking problem, and propose TempQ-Jail. This method first fuses multiple attack mechanisms through heterogeneous candidate construction to expand the attack coverage of the candidate space; it then estimates the end-to-end attack value of candidates based on

aspects such as security gate passage, dangerous visual generation, preservation of original intent, and temporal validity; finally, through budget-aware candidate ranking, high-value candidates are prioritised at the front of the limited query trajectory. On CogVideoX-5B, based on 70 common viable intents derived from T2VSafetyBench, we conducted a unified comparison with six representative T2V jailbreak methods. The results show that TempQ-Jail achieves TP-ASR@5 and TP-ASR@10 of 48.9% and 65.4%, representing improvements of 4.6 and 4.0 percentage points, respectively, over the strongest baselines under the corresponding budgets, whilst also achieving the highest AUC-TP (0.469) and the lowest AvgQ (6.3). Further analyses of query trajectories, candidate allocation, failure attribution and ablation studies demonstrate that TempQ-Jail is capable of more effectively identifying and prioritising candidates with full attack potential, thereby providing an effective framework for candidate allocation and ranking in T2V red teaming scenarios with query constraints.

Tianmeng Fang is with the School of Computing and Information Systems, Master of IT in Business (MITB), Singapore Management University, Singapore 178903, Singapore. (Email: fangtianmeng@gmail.com).

Jiancheng Wang is with the School of Computer Science and Technology, Anhui University, Hefei 230601, China. (Email: e24301271@stu.ahu.edu.cn).

Chen Wang is with the Department of Electrical and Computer Engineering, University of Miami, Coral Gables, FL 33146, United States. (Email: chenwang9508@163.com).

Liming Wang is with CSG Digital Operations Software Technology (Guangdong) Co., Ltd., Shenzhen 518000, China. (Email: 448171821@qq.com).

Wei Wang and Xiaochun Cao are with the School of Cyber Science and Technology, Sun Yat-sen University, Shenzhen Campus, Shenzhen 518107, China. (Email: wangwei29@mail.sysu.edu.cn, caoxiaochun@mail.sysu.edu.cn).

Jiayang Liu is with the College of Computing and Data Science, Nanyang Technological University, Singapore 639798, Singapore. (Email: ljyljy957@gmail.com).

Corresponding author: Wei Wang.

Keywords Text-to-video generation · Jailbreak attack · Query-constrained attack · Candidate ranking · AI safety

1 Introduction

In recent years, text-to-video (T2V) models have made rapid progress in terms of visual quality, motion modelling and temporal consistency, enabling them to generate videos containing complex object interactions, state changes and the evolution of continuous events based on textual descriptions [1–4]. Unlike static image generation, T2V models must not only depict the visual

T. Fang et al

Figure

Fig. 1 Under a limited target query budget, the effectiveness of a T2V jailbreak depends not only on whether valid candidates exist, but on whether they are reached before the budget is exhausted. An unguided query order wastes the budget on low-value candidates, whereas TempQ-Jail estimates end-to-end attack utility and ranks candidates so that effective ones enter the query trajectory earlier.

content within a single frame, but also model the dynamic changes in objects, actions and event relationships over time [5].

This temporal generation capability significantly expands the scope of application for generative models, whilst also introducing more complex security risks; harmful content may appear directly in individual frames, or may be constituted by multiple temporal segments—which, when observed in isolation, are not particularly significant—that together form a complete harmful event [6–9]. For example, in a video describing a pickpocketing incident, when individual scenes such as “approaching a pedestrian”, “reaching out to touch clothing” and “subsequently walking away”, each clip may not, on its own, be sufficient to indicate a clear illegal act; however, when these actions are combined in chronological order, the entire video may constitute a complete theft incident.

To mitigate the risk of generating harmful videos, existing text-to-video systems typically deploy input safety filters prior to the generation model to intercept prompts containing violence, pornography, illegal acts or other restricted intents [10–14]. However, input safety measures primarily operate on the text side, whilst attackers can weaken explicit sensitive semantics through conceptual decomposition, indirect descriptions, scene reconstruction and temporal cues, enabling candidate prompts to bypass moderation and enter the video generation stage [7,15–21]. More importantly, the fact that a prompt passes the input filter does not mean the attack has succeeded. Specifically, the generated video may still be safe, produce dangerous content unrelated to the original target, or only briefly display risk in a small number of local frames.

In response to the aforementioned input-side defences, existing text-to-video jailbreak methods primarily focus on the construction and search for attack candidates, where attackers conceal or mitigate explicit dangerous semantics through methods such as conceptual decomposition [15], prompt optimisation [16], scene segmentation [7], implicit semantic enticement [17] and temporal reconstruction [22, 23], whilst retaining the original attack intent as much as possible whilst circumventing input security filters. However, in black-box scenarios, existing attacks face the following challenges: (1) Limited target query budget. Although attackers can generate a large number of candidates locally for the same malicious intent, a single target T2V query typically involves input validation, video generation and subsequent evaluation, incurring high computational and time costs. (2) It is difficult to assess the end-to-end effectiveness of candidates in advance. Even if a candidate successfully bypasses the input security gate, it may generate a safe video, deviate from the original attack intent, or present dangerous content only briefly in a small number of time slices.

In light of these challenges, we further model black-box jailbreaks in security-filtered T2V systems—moving beyond the traditional candidate generation problem—as a query-constrained candidate allocation and ranking problem, and propose TempQ-Jail accordingly; Fig. 1 illustrates this shift from candidate generation to candidate allocation under a finite budget. TempQ-Jail comprises three core modules: heterogeneous candidate construction, end-to-end attack value estimation, and budget-aware candidate ranking. Firstly, to increase the likelihood of obtaining effective attack candidates under limited queries, the heterogeneous candidate construction module draws upon a variety of attack mechanisms to establish a fixed and diverse pool of candidates for each original malicious intent, thereby enhancing attack coverage within the candidate space. Secondly, to address the difficulty in predicting the effectiveness of candidate attacks, the end-to-end attack value estimation module comprehensively evaluates their ability to generate dangerous visuals, preserve the original intent and maintain temporal validity, thereby identifying high-value candidates that are more likely to realise a complete attack chain. Finally, to address the constraint of a limited number of target queries, the budget-aware candidate ranking module generates a unified priority sequence based on the end-to-end attack value of the candidates, enabling high-value candidates to enter the actual query trajectory earlier, thereby improving the attack success rate within a limited budget.

We use CogVideoX-5B as the target T2V model and derive 70 “common viable intents” from the malicious prompt dataset of T2VSafetyBench [6], covering six categories of security risks: Violence, Gore, Self-harm, Pornography, Illegal Activity and Disturbing Content, to form a unified test set. Under consistent experimental settings, we systematically compare TempQ-Jail with six attack methods: DACA [15], T2V-OptJail [16], SceneSplit [7], SPARK [17], TFM [22] and BSB [23]. We first employ ASR@B [24], commonly used in prior work, to measure the baseline attack success rate within a given query budget. Building on this, and in light of the temporal characteristics of T2V attacks and query-constrained scenarios, we further propose three evaluation metrics: TP-ASR@B requires the generated results to simultaneously satisfy the generation of dangerous content, preservation of the original intent, and temporal continuity, and is used to measure the strict attack success rate within a given budget; AUC-TP aggregates TP-ASR across different query budgets to characterise the overall attack performance throughout the entire finite query process; AvgQ measures the average number of target queries required to achieve a strict attack success for the first time; a lower value indicates that the method can achieve a successful attack with fewer queries. Under a fixed query budget, TempQ-Jail achieves TP-ASR@5 and TP-ASR@10 of 48.9% and 65.4%, respectively, representing improvements of 4.6 and 4.0 percentage points over the strongest baseline under the corresponding budgets. Across the complete query trajectory, TempQ-Jail also achieves the highest AUC-TP (0.469) and the lowest AvgQ (6.3). Compared to the best baseline, it increases AUC-TP from 0.425 to 0.469 and reduces AvgQ from 6.8 to 6.3, indicating that it not only improves the success rate of strict attacks within a limited budget but also enables valid attack candidates to enter the actually accessible query sequence at an earlier stage. Overall, TempQ-Jail transforms large-scale heterogeneous jail-break candidates into attack sequences that can be efficiently utilised within a limited target query budget, providing a more effective black-box attack method for high-cost T2V systems.

The main contributions of this paper are as follows:

– We model black-box jailbreaking in secure T2V systems as a budget-constrained query allocation problem, emphasising that, under a finite budget, the effectiveness of an attack depends not only on the existence of valid candidates but also on whether they can be accessed in a timely manner within the query trajectory.

– We propose TempQ-Jail, comprising three core modules: heterogeneous candidate construction, end-to-end attack value estimation, and budget-aware candidate ranking. Based on a comprehensive evaluation of candidates' attack potential, it prioritises the allocation of high-value candidates to limited target queries.

– Under a unified guarded T2V evaluation, TempQ-Jail achieves the best results across all evaluation metrics amongst the seven compared methods, and consistently outperforms the other methods under limited target query budgets.

References (70)