← Lab /AI/ML

Rendering documents as images blocks many prompt injections but some still succeed

Image rendering conditionally protects multimodal models from prompt injection, yet certain attacks remain effective

AI/ML arXiv 18 Nov 2026 Measurement Simulation evidence

Published as “What Survives the Shift from Text to Pixels? Conditional Protection against Prompt Injection in Image-Rendered Documents”

Why it matters

Rendering can be used as a conditional defense against prompt injection, but its effectiveness depends on the model, operation, and rendering parameters, and it may incur significant utility loss for complex queries.

Summary

Rendering page images cuts attack success for appending and formatting across all six multimodal models, but Qwen3-VL-8B still carries out answer-replacement attacks in 77.96% of image-based responses. The protection varies by model, operation, target type, and rendering settings, and a small search over attack candidates can close most of the image gap for Qwen and Gemini. Utility stays near parity on original QA (93-102% UR) but drops sharply for integration questions, e.g., Qwen’s UR falls to 61.99%. The paper also shows that models often read image-borne commands without executing them, so illegibility alone does not explain failures.

What they found 4

  1. Rendering reduces attack execution for appending and formatting but not for answer replacement in Qwen.

    “Rendering reduces attack execution, but the remaining vulnerability depends on the model and operation (Table 1).”

  2. Qwen3-VL-8B executes the fixed-phrase replacement attack in most image responses.

    “Qwen executes the fixed-phrase replacement attack in most image responses”

  3. Utility ratio on original questions stays within 93-102% for all models, but Qwen drops to 61.99% on integration questions.

    “Utility ratios on original questions range from 93.31% to 101.61%, but Qwen falls to 61.99% when answers combine two evidence spans.”

  4. Illegibility cannot explain all failed image attacks; models often transcribe commands they do not execute.

    “Illegibility cannot explain all failed image attacks: models transcribe commands they do not execute and execute more when the user permits.”

Caveats 3

  • Despite overall lower ASR for images, Qwen still achieves 77.96% success on answer-replacement attacks, showing that rendering does not fully block dangerous operations.
  • Utility ratios on original questions range from 93.31% to 101.61%, but Qwen falls to 61.99% when answers combine two evidence spans.
  • Higher resolution and larger font size weaken the protection offered by rendering, raising ASR by more than 25 percentage points.

What’s new here 4

  • Operation-level measurement of injection success (append, format, replace) for both text and image modalities.
  • Behavioral diagnostics separating reading from execution, including OCR vs. image and user-authorization effects.
  • Mechanistic analysis using activation patching and attention blocking to locate where commands reside in the model.
  • Evaluation of attack-budget search showing that limited candidate exploration can erase the image advantage.