Chiosa
AI Security & Safety

Page images reduce some document attacks, but not all

What Survives the Shift from Text to Pixels? Conditional Protection against Prompt Injection in Image-Rendered Documents · arXiv:2611.24231

3 min
Updated

In plain words

A document can contain instructions from an attacker alongside facts needed to answer a question.

This study compared six models answering from the same documents shown as text or as page images, and checked whether they followed three kinds of hidden command as well as whether they answered clean questions correctly.

Images reduced two kinds of command-following across all six models. But Qwen still replaced its answer with an attacker’s phrase in most image responses, so showing a document as an image did not stop every kind of command.

The research

A document’s appearance can change whether its embedded command controls an answer, but an image format does not make every command fail.

The results change the expectation that lower marker execution means broad protection: answer replacement remained effective for one tested model, and combining evidence could also make its image answers less useful.

The evaluation pairs text and page-image documents to measure which embedded commands models execute and how well they answer clean questions.

The paired tests found that images lowered append and format execution for every model, but replacement remained a sharp exception: Qwen followed that command in 77.96% of image responses.

Clean question-answering scores were measured separately, so this attack result does not imply that answers stayed useful.

On added questions requiring evidence from two spans, Qwen’s image score was 36.71 F1 points versus 59.22 with text. The results show that command execution and answering utility depend on the operation and question demand.

The main comparison covers six models, but the internal interventions were conducted only with Qwen and the tested commands and settings. The candidate search used a fixed set of 16 commands on a 90-source experiment, and the cited OCR comparison does not identify its model.

What the evidence shows

  • Test each command separately

    This operation-level evaluation measures whether models execute commands embedded in external documents while answering questions. It pairs each source as text and as a page image, testing marker appending, marker formatting, and fixed-phrase replacement separately.

    The pairing keeps the question and attack wording matched, so differences can be read as effects associated with how the source is presented in this test.

  • Protection varies by operation

    The paired comparison found lower append and format execution with images for all six models, but the size of the reduction varied. Qwen’s image response still carried the requested fixed replacement phrase in 77.96% of scored responses.

    That contrast matters: improvement on two operations does not mean the same model resists a command that overrides the answer altogether.

  • Combining evidence can cost utility

    The question-answering check measured word overlap with reference answers, separately from attack execution. On added questions requiring evidence from two spans, Qwen scored 59.22 word-overlap F1 points with text and 36.71 with images.

    This image-related loss shows why clean performance on original questions alone cannot establish that rendering preserves utility when answers must combine evidence.

  • More attempts change the picture

    A separate experiment let an attacker try up to eight commands selected from a ranked set. That search nearly closed Qwen’s image gap for appending and eliminated it for formatting at the largest tested budget, while GPT-5-nano retained an image gap for every operation and budget. The outcome therefore depends on the model and command, even under this limited search.

  • Reading differs from following

    The OCR comparison found much more command execution from imperfect recognized text than from page images, which makes unreadability an incomplete explanation. Internal interventions in Qwen add further evidence: changing states at command positions could induce operations, and blocking positions outside the command region from attending to it across all decoder layers stopped text execution but barely changed image execution.

    The authors interpret this as a difference in how commands are represented across the two input forms.

Deep

Next paperFeedback learning can weaken agents’ authorization checks