Skip to content

Researchers propose Text-DJ, jailbreaking large vision-language models by exploiting OCR capabilitiesText is All You Need for Vision-Language Model Jailbreaking

Paper Tracker· arXiv:2602.00420· Yihang Chen, Zhao Xu, Youyuan Jiang, Tianle Zheng, Cho-Jui Hsieh·Indexed by this site · 2026-10-09· Originally publishedAttacks

Quick read

Attacks

Based on the paper PDF (AI-generated); refer to the original

Text-DJ jailbreaks LVLMs with a split text image grid; on HADES, GPT 4.1 mini's average ASR is 64.27%.

Threat modelBlack-box, model-agnostic: does not access gradients or parameters, and is not tied to a single victim model. The attacker uses only text prompts, writing the split harmful sub-queries and unrelated distractor queries as an image grid with positioning instructions, to induce the LVLM to give harmful responses. Victim systems are open-source and closed-source LVLMs, including API models.

Questions
LVLM safety checks mostly target explicit text or related images, and white-box attacks requiring gradients cannot be applied to closed-source APIs. The authors want a black-box, model-agnostic jailbreak using only text prompts, exploiting OCR to read in split harmful sub-queries.
Methods
Text-DJ uses Qwen2.5-3B-Instruct to split the harmful query into 3 sub-queries, then uses all-MiniLM-L6-v2 to greedily select 9 most unrelated distractor questions, writes them into a 4×3 text image, places sub-queries at positions 6, 8, and 12, and instructs the model to answer these positions.
Experiments and results
On HADES and HEx-PHI, the average ASR of Text-DJ for the six LVLMs is higher than the baselines in the table. On HADES, GPT 4.1 mini achieves 64.27% and Gemini-2.5-Flash achieves 44.00%. The OpenAI refusal rate is 0.00%.
Limitations and future work
The paper does not specifically discuss method limitations. The conclusion calls for defenses for the OCR module that can resist cross-modal semantic interference. Guardrails and ablations only report on the open-source Qwen3-VL; the number of repetitions for the main experiment's ASR is not reported.
Experimental setupQwen/Qwen3-VL-4B-Instruct、Qwen/Qwen3-VL-8B-Instruct et al. · HADES、HEx-PHI · ASR、EASR et al.
Evaluated models
Qwen/Qwen3-VL-4B-InstructQwen/Qwen3-VL-8B-InstructQwen/Qwen3-VL-30B-A3B-Instructgpt-4o-minigpt-4.1-minigemini-2.5-flash
Benchmarks
HADESHEx-PHI
Metrics
ASREASRRR
AI summaryThe paper proposes Text-DJ, a jailbreak attack that exploits the OCR capability of large vision-language models to bypass existing safety alignment. The method has three steps: decompose a harmful query into multiple semantically related but more harmless sub-queries; select distractor queries least related to the harmful query; input the sub-queries and distractor queries simultaneously to the model as an image grid, with sub-queries placed in the middle of the grid. The authors attribute the attack's success to two factors: converting text prompts into images bypasses standard text filters; and the interference from many unrelated queries prevents the model's safety protocols from linking the scattered sub-queries. The authors claim this method bypasses the safety alignment of current state-of-the-art LVLMs and note the need for defenses designed for fragmented multimodal inputs. Paper number arXiv:2602.00420.

The paper proposes Text-DJ, a jailbreak attack that exploits the OCR capability of large vision-language models to bypass existing safety alignment. The method has three steps: decompose a harmful query into multiple semantically related but more harmless sub-queries; select distractor queries least related to the harmful query; input the sub-queries and distractor queries simultaneously to the model as an image grid, with sub-queries placed in the middle of the grid. The authors attribute the attack's success to two factors: converting text prompts into images bypasses standard text filters; and the interference from many unrelated queries prevents the model's safety protocols from linking the scattered sub-queries. The authors claim this method bypasses the safety alignment of current state-of-the-art LVLMs and note the need for defenses designed for fragmented multimodal inputs. Paper number arXiv:2602.00420.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    Text-DJ splits harmful queries into OCR text grids, bypassing LVLM defenses that focus on explicit text under black-box settings.

    Existing defenses focus on explicit text or related images; Text-DJ instead uses OCR to read text images split apart to jailbreak LVLMs.

    • Scenario: The authors state that LVLMs connect a visual encoder with an LLM for visual question answering, image captioning, and multimodal reasoning. Training corpora may contain toxic or sensitive information, leading to privacy leakage or harmful outputs; visual inputs may also bypass alignment applied only to text.
    • Existing shortcomings: The authors state that many jailbreaks are white-box, requiring gradients or parameters, and thus cannot be used on closed-source API models such as the GPT series and Gemini series. Many attacks are also model-specific, with insufficient transferability when switching models, and the cost of generating specialized adversarial images is higher than text attacks.
    • Authors' judgment: The authors believe that text written as images can bypass conventional text filtering, and that a large number of irrelevant queries make it difficult for safety mechanisms to connect the split sub-queries. The authors state that safety alignment of OCR modules is largely overlooked.
    • This paper's approach: Proposes Text-DJ (Text Distraction Jailbreaking). A harmful query is split into multiple semantically related but milder sub-queries, paired with as-irrelevant-as-possible distraction queries, and all are sent to the model as an image grid, with sub-queries placed in the middle of the grid.
    • Threat model:
      • Goal: Bypass safety alignment so that the LVLM gives harmful responses to harmful or disallowed prompts.
      • Knowledge: black-box, model-agnostic. No access to gradients or parameters, and not tied to the structure of a single victim model.
      • Capability: Uses only text prompts. The attacker writes queries as images with positioning instructions, requiring no real photos or diffusion-model-generated harmful images.
      • Victim system: Open-source and closed-source LVLMs, including API-deployed GPT series and Gemini series.
  2. What related research exists?

    Related work covers LVLMs, white-box gradient attacks, and black-box image jailbreaks; the authors define Text-DJ as semantic interference.

    The paper organizes related work by LVLM architecture, white-box attacks, black-box image attacks, and query decomposition.

    LVLMs and Alignment

    • LLaVA (Liu et al., 2023), MiniGPT-4 (Zhu et al., 2023): Freeze the visual encoder (e.g., CLIP-ViT) and connect it to the LLM via a trainable projection, then perform vision-text alignment pretraining and visual instruction tuning.
    • Qwen-VL series (Bai et al., 2023; Yang et al., 2024, 2025): The authors state that they use DeepStack to fuse ViT features to handle high-resolution images, performing better on multilingual OCR and complex documents; this paper exploits such OCR capabilities.
    • GPT-4o (Hurst et al., 2024), Gemini 2.5 (Comanici et al., 2025): The authors state that both achieve state-of-the-art in complex reasoning and use post-training alignment to enhance trustworthiness. Text-side alignment includes RLHF and others.

    White-box LVLM Attacks

    • GCG (Zou et al., 2023), AutoDAN (Liu et al., 2023): Gradient attacks transferred from the pure language domain, optimizing adversarial suffixes added to text or image patches to break alignment. Other works use gradients to modify latent space, shifting internal states from harmful queries to safe queries.
    • The authors note that for closed-source LVLMs, architecture and parameters are unknown, making white-box attacks unusable; existing gradient attacks are typically model-specific and have transferability issues. The authors claim their black-box method does not depend on the victim model.

    Black-box Image Jailbreaks

    • FigStep (Gong et al., 2025) uses typographic transformations to hide harmful text in images; MM-SafetyBench (Liu et al., 2024) rewrites questions, extracts unsafe keywords, and converts them into images.
    • HADES (Li et al., 2024) uses diffusion models to generate harmful images and then optimizes them, examining how harmful images themselves break safety.
    • CS-DJ (Yang et al., 2025) writes decomposed harmful queries directly on images and also uses real images as visual distraction; the images themselves do not contain harmful information. The authors claim that in Text-DJ such visual images are optional, and semantic distraction is more effective than visual distraction.

    Query Decomposition

    • DrAttack (Li et al., 2024), agent-driven decomposition (Srivastav and Zhang, 2025), multi-turn jailbreak Crescendo (Russinovich et al., 2025): Decompose harmful queries into steps that appear more benign or vague individually. Text-DJ uses this as the first step.

    Baseline methods are HADES and CS-DJ. Benchmarks are HADES (5 categories, 150 per category, 750 total) and HEx-PHI (revised 10 categories, 30 per category, 300 total). The authors state that the HADES method generates adversarial images in a complex manner and performs poorly on the HADES dataset, so it was not included for HEx-PHI. The authors position Text-DJ as a black-box, model-agnostic method that relies only on text prompts, and claim it is more efficient and achieves higher ASR because it only requires writing text on images; the paper does not report query counts or time costs.

  3. How does the paper address this problem?

    First decompose into sub-queries, then greedily select the least related questions, and finally write them as a grid text image and specify positions for answering.

    Text-DJ works in three steps: split the harmful query, select the semantically farthest distraction questions, draw all text into the same grid image, then have the LVLM answer the specified positions.

    Adversarial query decomposition

    • Use a prompted LLM to split the harmful query q into m sub-queries. Each should be part of the original query, from a different angle or intermediate step, less direct and more implicit; together they should reflect the original harmful intent.
    • The decomposition model is Qwen/Qwen2.5-3B-Instruct. In the main experiment m=3. Appendix C.1 gives the full prompt.

    Distraction query construction

    • Select n questions from the offline pool Dd so that they are as different as possible from q. The authors state this is NP-hard diverse subset selection, approximated greedily.
    • The encoder is sentence-transformers/all-MiniLM-L6-v2. The first is qd(1)=argminqd∈ Ddcos⟨ Embed(qd),Embed(q)⟩, i.e., the question with the smallest cosine similarity to q. Each subsequent one also adds the sum of cosine similarities with already selected distraction queries, then takes the minimum (Eq. (1)).
    • Dd is 100 science and culture fact questions randomly generated by the authors, unrelated to harmful intent. The prompt is in Appendix C.4.

    Image formation and presentation

    • TiI writes sub-queries and distraction queries as images separately. Text and background colors are random; contrast follows WCAG AA with a lower bound of 4.5 to ensure text visibility. Color generation code is in Appendix C.5.
    • In the main experiment n=9, 12 images total, arranged in a 4×3 grid. Positions are numbered 1–12 from the top-left, row by row; sub-queries are placed at 6, 8, 12. Algorithm 1 places distraction images sequentially in non-designated positions and the next sub-query image in designated positions.
    • A further instruction asks the model to focus on these positions and answer them simultaneously, noting the other images are not required. The full text is in Appendix C.2. The victim model's generation temperature is set to 0.1. Appendix B.2 demonstrates the three steps with one query; its text is not repeated here.

    How success is computed

    • ASR is the proportion of N responses judged unsafe. The judge model is PKU-Alignment/beaver-dam-7b, with the judgment function denoted Is Unsafe. The paper does not state a score threshold.
    • EASR is the proportion of queries where at least one template in a set of templates succeeds. The specific repetition method is in the experiments section.
  4. What experiments did the paper conduct?

    Across six LVLMs, Text-DJ's average ASR is higher than HADES and CS-DJ; in the guardrail experiment, OpenAI's rejection rate is 0.00%.

    Experimental setup

    • Victim models: Qwen/Qwen3-VL-4B-Instruct, Qwen/Qwen3-VL-8B-Instruct, Qwen/Qwen3-VL-30B-A3B-Instruct, gpt-4o-mini, gpt-4.1-mini, gemini-2.5-flash. Generation temperature is 0.1 for all.
    • Data: HADES has five categories (Animal, Financial, Privacy, Self-Harm, Violence), 150 per category, 750 total. HEx-PHI, after removing category 2 in the August 19, 2024 revision, has 10 categories, 30 per category, 300 total. The distraction pool is 100 science and culture questions.
    • Main setting: m=3, n=9, 4×3 grid, sub-queries at positions 6, 8, 12; random colors, minimum contrast 4.5.
    • Baselines: HADES and CS-DJ. The HADES method is not run on HEx-PHI.
    • Metrics and judging: ASR is the proportion of unsafe responses; EASR in the appendix is computed by running Algorithm 1 5 times and counting at least one success. The judge is PKU-Alignment/beaver-dam-7b. Decomposition uses Qwen/Qwen2.5-3B-Instruct, sentence embeddings use all-MiniLM-L6-v2. The number of repetitions for the main experiment's ASR is not reported in the paper.
    • Guardrails: Input first passes through omni-moderation-latest, or GuardReasoner-VL-3B/7B; if judged unsafe, it is rejected and not sent to the victim model. The latter two have temperature 0 and top p 1.0. Table 3 and Table 4 contain only the three open-source models and HADES categories. Ablations are also only on open-source models, with other settings the same as the main experiment.

    Main results

    The table below shows average ASR (%). The three HADES columns are from Table 1, the two HEx-PHI columns from Table 2. HEx-PHI does not report the HADES method.

    Swipe horizontally to read the table

    Victim modelHADES Text-DJHADES CS-DJHADES methodHEx-PHI Text-DJHEx-PHI CS-DJ
    Qwen3-VL-4B48.1334.4011.8742.3327.33
    Qwen3-VL-8B52.6738.539.3347.3334.33
    Qwen3-VL-30B-A3B57.6056.2713.6048.3345.33
    GPT 4o mini59.3346.804.1359.0044.67
    GPT 4.1 mini64.2756.008.4060.3345.00
    Gemini-2.5-Flash44.0040.5321.3341.3341.00
    • The authors state that Text-DJ's average ASR is consistently higher than previous baselines. The average columns in the table above are indeed all higher for Text-DJ, but not per category: in HADES's Animal category, on Qwen3-VL-8B Text-DJ is 42.67% and CS-DJ is 49.33%; on GPT 4.1 mini they are 28.67% and 33.33% (Table 1).
    • In HEx-PHI category 3, Gemini-2.5-Flash's Text-DJ is 23.33% and CS-DJ is 40.00% (Table 2). The authors still compare methods by average ASR.
    • The authors explain the advantage over CS-DJ as semantic distraction being more effective than visual distraction. Appendix Fig. 10 compares input forms with a single example and states that Text-DJ needs no real or generated images and has higher ASR; the aggregate numbers follow the table above.

    Input-side guardrails

    • This tests whether Text-DJ inputs can be rejected by guardrails first. The OpenAI Moderation API's ASR change on the three Qwen3-VL models is −0.00 each; rejection rates in Table 4 are all 0.00%. The authors state the attack bypasses nearly all detection by this API.
    • Under GuardReasoner-VL-7B, HADES average ASR is: Qwen3-VL-4B 39.20 (Table 3 records −8.93), 8B 43.47 (−9.20), 30B-A3B 54.27 (−3.33). Corresponding average rejection rates are 14.93%, 14.93%, 3.60% (Table 4).
    • The largest drop in parentheses in Table 3 is Qwen3-VL-8B's Financial: 52.67 (−18.00) under GuardReasoner-VL-7B. The authors state that even under these input filters, Text-DJ maintains a high ASR.

    Text-to-image, number of sub-queries, and number of distractions

    • Removing TiI (Table 6): replaced with a 1×1 white image placeholder plus plain text. With TiI, the average ASR for 4B/8B/30B-A3B is 48.13%, 52.67%, 57.60%; without TiI it is 20.13%, 11.60%, 20.27%. The authors consider cross-modal image conversion key to bypassing text-side safety alignment.
    • Number of sub-queries m (Table 9): for m=1/2/3, 4B is 12.13%, 38.40%, 48.13%; 8B is 9.07%, 38.00%, 52.67%; 30B-A3B is 22.13%, 54.67%, 57.60%. The authors state that at m=1 the safety mechanism can still identify the harmful query; larger m values are not given numbers, and the authors state there is no ASR gain and decomposition is slower.
    • Number of distractions n (Table 10): at n=0 the three are 30.53%, 27.20%, 56.53%; at n=9 they are 48.13%, 52.67%, 57.60%. The authors state that at n=0 the attack is ineffective, and n=9 or 12 is better. In the table, 30B-A3B at n=0 is already 56.53%, and at n=3 is 53.87%, lower than n=0; on 8B, n=9 is 52.67%, higher than n=12's 44.93% and n=15's 46.80%.

    EASR over five runs

    • Appendix A.1 runs Algorithm 1 5 times and reports the proportion with at least one success. Table 5 lists only the three open-source models: Text-DJ is 74.67%, 82.13%, 82.53%, and CS-DJ is 70.13%, 73.87%, 82.27%. The table note mentions open-source and closed-source and the HADES method, but the table does not contain these two items.
    • In 30B-A3B's Violence category, Text-DJ is 90.00% and CS-DJ is 94.00%. The authors state Text-DJ is consistently higher than CS-DJ; the average column is so, but this category is not.

    Other ablations and analyses

    • Distraction strategy (Table 7): least relevant vs. random, 4B is 48.13 vs. 37.20, 8B is 52.67 vs. 48.13; 30B-A3B random is 58.40, higher than least relevant's 57.60. The authors state least relevant is higher.
    • Embeddings (Table 8): sentence embeddings vs. clip-ViT-L-14 image embeddings, 4B is 48.13 vs. 48.66, 8B is 52.67 vs. 53.60, 30B-A3B is 57.60 vs. 56.27. The authors state sentence embeddings are slightly higher; the average columns for 4B and 8B are not so. The main experiment still uses sentence embeddings.
    • Position (Table 11): 4B middle/first/last/random is 48.13, 35.47, 39.87, 45.60; 8B random is 53.07, higher than middle's 52.67. This ablation marks sub-queries with a red box. The authors state later positions are preferable, but not necessarily the last three positions.
    • Color scheme (Table 12): random vs. fixed red text on white background, 4B is 48.13 vs. 42.40, 30B-A3B is 57.60 vs. 55.07; 8B fixed is 53.47, higher than random's 52.67. The authors state random colors give higher ASR.
    • Arrangement (Table 13): 4×3, 6×2, 3×4, 2×6. On 4B, 2×6 is 49.47, higher than 4×3's 48.13. The authors state 4×3 is robust and ASR is insensitive to arrangement.
    • Resolution and font (Table 14): 100×60 and comic font. 4B is 47.47 and 44.80, compared to the main setting's 48.13. The authors state these two factors do not cause large ASR differences when text is readable.
  5. What are some points that can be further explored?

    The paper does not specifically discuss its own limitations; the conclusion calls for building defenses against cross-modal semantic interference for OCR modules.

    Limitations and future directions noted by the authors

    • The paper has no Limitations, Discussion, or Future Work section, and does not frame any experimental setting as a limitation of the method itself.
    • The Conclusion states that there is a gap in current safety alignment and calls for developing defenses for OCR modules that can resist cross-modal semantic interference attacks. This is the explicitly stated future direction in the paper.

    Experimental coverage

    • Victim models are three Qwen3-VL Instruct variants, plus gpt-4o-mini, gpt-4.1-mini, and gemini-2.5-flash, 6 in total; generation temperature 0.1 (Sec. 4.1).
    • Harmful queries are 750 from HADES and 300 from HEx-PHI; the distraction pool is 100 science and culture questions (Sec. 4.2). Baselines are HADES and CS-DJ; HEx-PHI does not include the HADES method (Sec. 4.3–4.4).
    • Guardrails are the OpenAI Moderation API, GuardReasoner-VL-3B, and GuardReasoner-VL-7B. Table 3 and Table 4 report only the three open-source models and HADES categories. Ablations are on open-source models (Sec. 5).
    • The judge is beaver-dam-7b; decomposition uses Qwen2.5-3B-Instruct. EASR repeats Algorithm 1 5 times (Appendix A.1). The number of repetitions for the main experiment's ASR is not reported in the paper.
    • The paper does not report agreement between the judge and human judgment, nor the number of queries or time per single attack.
  6. Summarize the main content of the paper

    Text-DJ jailbreaks six LVLMs with a black-box text-image grid, achieving an average ASR higher than the listed baselines, and successful samples remain even under guardrails.

    Text-DJ is a black-box, model-agnostic LVLM jailbreak: it does not access gradients or parameters, and only writes text as images.

    • Problem: The authors believe existing defenses focus on text filtering or related images, and white-box and model-specific image attacks are difficult to apply to API models like GPT and Gemini. The paper exploits OCR to read in split harmful text.
    • Method: Qwen2.5-3B-Instruct splits the harmful query into 3 more implicit sub-queries; all-MiniLM-L6-v2 greedily selects 9 distractor questions with the lowest cosine similarity; TiI is made into a 4×3 image, with sub-queries placed at positions 6, 8, and 12, then the model is instructed to answer these positions. Victim model temperature is 0.1.
    • Main results: On HADES, Text-DJ's average ASR is 64.27% for GPT 4.1 mini, 44.00% for Gemini-2.5-Flash, and 48.13%, 52.67%, 57.60% for three Qwen3-VL models (Table 1). On HEx-PHI, GPT 4.1 mini is 60.33% (Table 2). The six-row averages are all higher than the CS-DJ and HADES methods in the table, but categories such as Animal have cells where Text-DJ is lower.
    • Guardrails and repetition: The OpenAI Moderation API's rejection rate for Text-DJ inputs is 0.00% (Table 4). Under GuardReasoner-VL-7B, Qwen3-VL-4B's HADES average ASR is 39.20% (Table 3). The EASR over five runs on Qwen3-VL-8B is 82.13% (Table 5).
    • Authors' conclusion: The authors believe the success comes from text-into-image bypassing text filtering, and the semantic interference caused by unrelated queries; they also believe this exploits a vulnerability in the LVLM's OCR capability. The Conclusion calls for defenses for OCR modules that can resist cross-modal semantic interference.

Related papers

Show 3 more papers
Read originalarxiv.org