Shae McFaddenSM

One Pic is All it Takes: Poisoning Visual Document Retrieval Augmented Generation with a Single Image

TMLR Transactions on Machine Learning Research, 2026

  • Ezzeldin Shereen
  • Dan Ristea
  • Shae McFadden
  • Burak Hasircioglu
  • Vasilios Mavroudis
  • Chris Hicks
  • The Alan Turing Institute
  • University College London
  • King’s College London

Abstract

Retrieval-augmented generation (RAG) is instrumental for inhibiting hallucinations in large language models (LLMs) through the use of a factual knowledge base (KB). Although PDF documents are prominent sources of knowledge, text-based RAG pipelines are ineffective at capturing their rich multi-modal information. In contrast, visual document RAG (VD-RAG) uses screenshots of document pages as the KB, which has been shown to achieve state-of-the-art results. However, by introducing the image modality, VD-RAG introduces new attack vectors for adversaries to disrupt the system by injecting malicious documents into the KB. In this paper, we demonstrate the vulnerability of VD-RAG to poisoning attacks targeting both retrieval and generation. We define two attack objectives and demonstrate that both can be realized by injecting only a single adversarial image into the KB. Firstly, we introduce a targeted attack against one or a group of queries with the goal of spreading targeted disinformation. Secondly, we present a universal attack that, for any potential user query, influences the response to cause a denial-of-service in the VD-RAG system. We investigate the two attack objectives under both white-box and black-box assumptions, employing a multi-objective gradient-based optimization approach as well as prompting state-of-the-art generative models. Using two visual document datasets, a diverse set of state-of-the-art retrievers (embedding models) and generators (vision language models), we show VD-RAG is vulnerable to poisoning attacks in both the targeted and universal settings, yet demonstrating robustness to black-box attacks in the universal setting.

Introduction

Retrieval-augmented generation (RAG) has recently gained significant attention in both research and practical large language model (LLM) deployments. RAG augments the parametric knowledge of LLMs by retrieving relevant chunks of information from external knowledge bases (KBs), thus improving groundedness and reducing hallucinations. One of the most common sources of external knowledge is PDF documents (e.g., user manuals, health records, academic articles). Most RAG pipelines for PDFs either extract only the main text and ignore images, charts, and tables, or apply optical character recognition (OCR) to extract text from those visual elements.

Recently, Faysse et al. (2024) were first to establish the promise of visual document retrieval (VDR) by regarding each page in a PDF document as an image and leveraging the recent breakthroughs in multi-modal embeddings and vision language models (VLMs). The same approach has been applied to multi-page document understanding and RAG, leading to visual document RAG (VD-RAG) pipelines that show significant performance improvements compared to textual RAG pipelines. VD-RAG is also used in practical settings, for example, Colette, a self-hosted VD-RAG product that can interact with technical documents.

The effectiveness of RAG relies primarily on the trustworthiness of the information in the KB. Challenging this assumption, recent work has shown that existing RAG pipelines are vulnerable to poisoning attacks, where an attacker injects malicious information into the KB. To create an impactful attack, the injected information must simultaneously (1) have a high chance of being retrieved, and (2) influence the output of the generative model. However, the extent to which KB poisoning can disrupt VD-RAG pipelines has not yet been explored in the literature.

In this paper, we bridge this gap by investigating the vulnerability of VD-RAG to poisoning attacks. We consider the white-box attack setting by adapting projected gradient descent (PGD) with a multi-objective loss, which we refer to as MO-PGD, to balance the optimization of the retrieval and generation objectives when crafting the malicious image. First, we propose a stealthy targeted attack objective where the image only influences specific queries, thus causing targeted disinformation on a certain topic. Second, we propose a universal attack objective where the image is optimized to be retrieved and influence generation for all queries, thus causing a denial-of-service (DoS) attack against the VD-RAG pipeline. Furthermore, we consider three black-box attack variants for both the targeted and universal objectives: (1) leveraging existing multi-modal generative models, (2) exploiting direct transferability across VD-RAG pipelines, and (3) optimizing the image over an ensemble of candidate embedding models and VLMs.

Related work

Zhuang et al. (2025) investigated the vulnerability of document retrievers to adversarial attacks; however, the work did not consider the joint problem of retrieval and generation.

Focusing on multi-modal RAG systems (image-text pairs), Ha et al. (2025) proposed targeted and universal poisoning attacks under both the white-box and black-box settings. Shortly after, Liu et al. (2025) proposed a targeted disinformation poisoning attack against multi-modal RAG systems. Nonetheless, the above two works consider KBs including image-text pairs, with the text modality greatly simplifying the attacks (e.g., including the targeted user query and/or malicious answer verbatim in the injected text). Importantly, all the above works attack outdated multi-modal embedding models (e.g., CLIP) that include known vulnerabilities, such as the so-called modality gap.

Our work specifically targets VD-RAG pipelines, considering task-specific datasets as well as state-of-the-art embedding models which do not exhibit the modality gap.

Poisoning VD-RAG

A VD-RAG pipeline consists of three main components. The first is a knowledge base K = {I1, …, IK} containing a set of K images, each corresponding to a page in a document. The second is a retriever R which uses a multi-modal embedding model E(·) that projects user queries (text) and KB images into a common vector space. The retriever then computes a similarity score S(E(q), E(I)) between a user query q and each image in I ∈ K. Common similarity metrics for RAG retrievers include cosine similarity and MaxSim proposed by Faysse et al. (2024). For each user query q, the retriever retrieves the top-k relevant images from K according to the similarity score, where k ≪ |K|. The third component is a generator G, which is a VLM that generates a response g to the user’s query q with the retrieved images in its context window. That is, g = G(q, R(q, K)).

the query also goes to the VLM USER text query q q RETRIEVER embedder E + similarity S top-k pages GENERATOR VLM G g ANSWER reply KNOWLEDGE BASE I′ page images page embeddings ATTACKER one image I′ inject if I′ is retrieved ATTACK OBJECTIVES TARGETED queries in Q⁺ get a malicious answer Q⁻ unaffected UNIVERSAL every query gets “I will not reply to you!” (DoS)
VD-RAG pipeline. The resulting poisoned document I′ is then injected into the KB. When the attack is successful, I′ is retrieved and causes the generator G to malfunction.

We consider an attacker that aims to disrupt the operation of the VD-RAG system by causing the retriever to retrieve a malicious adversarial image and the generator to output unhelpful responses to user queries.

Same-distribution data

To achieve this goal, the attacker is assumed to possess a dataset of potential user queries Q, corresponding ground truth answers A, and KB images I from the same distribution as the target RAG system.

Injecting documents/images

Furthermore, the attacker is capable of injecting documents/images into the KB. This could be realized either by an insider that has access to inject and modify enterprise-owned documents, or by an outsider injecting the poisoned documents/images in public domains (KBs are typically crawled from the internet, such as from Wikipedia).

Orthogonal to malicious prompts

Note that this threat model is orthogonal to works that protect against malicious user prompts, as those assume an attacker controls the user input while the KB is trusted, whereas we assume an attacker who can poison the KB.

In our work, we assume a weak attacker that can only inject one malicious image I′ into the KB, such that K′ = K ∪ I′, as a single image is sufficient to demonstrate the vulnerability of VD-RAG. Scaling to multiple images would amplify the impact, however, it would reduce the stealthiness of the attack.

Attack Definition

Building upon the work of Zou et al. (2024), a successful RAG poisoning attack must meet two conditions.

Retrieval condition

First, the retrieval condition requires that the malicious image is retrieved for the attacker-specified queries.

Generation condition

Second, the generation condition requires that, when present in the context window, the malicious image must cause the generator to output a specific response.

To compute a malicious image I′ that meets the above two conditions, we adopt a gradient-based adversarial example framework, initially proposed against neural network-based image classifiers. In particular, we extend the widely-used PGD optimization algorithm to jointly optimize the image to minimize a multi-objective loss function LRAG capturing both a retrieval loss LR and a generation loss LG as follows:

LRAG = λRLR + λGLG,(1)

where λR, λG are attacker-chosen coefficients controlling the relative weights of the two adversarial objectives. The adversary chooses a subset of positive target queries Q+ ⊆ Q that it wishes to influence; the remaining queries Q− = Q \ Q+ are termed negative queries. The set of answers A is also divided into malicious answers a+i desired by the attacker for targeted queries q+i ∈ Q+ and benign ground truth answers a−i for q−i ∈ Q−.

The retrieval and generation losses are defined as follows:

LR = Σi=1…|Q−| S(E(q−i), E(I′)) − Σi=1…|Q+| S(E(q+i), E(I′)),(2)
LG = Σi=1…|Q+| CE(G(q+i, Ik−1 ∪ I′), a+i) + Σi=1…|Q−| CE(G(q−i, Ik−1 ∪ I′), a−i),(3)

where S(·) is the similarity measure between the query and the image embeddings, CE(·) is the cross entropy loss, Ik−1 is a randomly sampled subset, with cardinality |Ik−1| = k − 1, of the attacker-owned KB image dataset I. Note that Ik−1 ∪ I′ represents the top-k images retrieved simulated by the attacker.

To minimize the loss LRAG we adopt a multi-objective variant of PGD, referred to as MO-PGD, which iteratively updates the adversarial image I′ using the following formula:

I′t = I′t−1 + clip[−ϵ,ϵ](α sign(∇I′t−1 LRAG)),(4)

where t ∈ {1, …, T} is the iteration index, ϵ is the perturbation budget controlling the attack stealthiness, α is the learning rate, ∇ is the gradient operator, I′0 is a benign image, and I′T is the final adversarial image to be injected to the KB.

attacker's queries Q⁺ and Q⁻ EMBEDDER E embeds queries and I′ scores S RETRIEVAL LOSS L_R raise S for Q⁺, lower it for Q⁻ POISON IMAGE I′ₜ starts as a benign I′₀ I′ₜ I′ₜ, k−1 pages, q GENERATOR VLM G answers each query VLM output GENERATION LOSS L_G CE to a⁺ for Q⁺, to a⁻ for Q⁻ malicious answers a⁺, ground truth a⁻ TOTAL LOSS L_RAG = 2 L_R + 1 L_G × λR = 2 × λG = 1 signed-gradient step, clipped to ±ϵ repeat for T = 250 steps after T steps, inject I′ into the KB
White-box attack (MO-PGD). We select an arbitrary document/image I and optimize it against target queries Q+ in the training set.

Attack Objectives

The injected image is used to realize one of two malicious objectives:

  1. a targeted attack where the image should only be retrieved and influence generation for a specific query (|Q+| = 1, Setting I), or a subset of queries (|Q+| ≪ Q) with either a single target answer (∀q+i, q+j ∈ Q+, a+i = a+j, Setting II) or distinct target answers (∀q+i, q+j ∈ Q+, a+i ≠ a+j, Setting III);
  2. a universal attack where the injected image should both be retrieved and influence generation for any possible user query (Q+ = Q).

The first objective corresponds to stealthy and specific attacks, such as spreading disinformation on specific topics; the second objective corresponds to a DoS attack against the availability of the VD-RAG system.

TARGETED, SETTING I 1 query, 1 answer query answer q⁺ q⁻ q⁻ q⁻ q⁻ q⁻ a⁺ a⁻ TARGETED, SETTING II 5 queries, 1 answer query answer q⁺ q⁺ q⁺ q⁺ q⁺ q⁻ reply a⁻ TARGETED, SETTING III 2 queries, 2 answers query answer q₁⁺ q₂⁺ q⁻ q⁻ q⁻ q⁻ a₁⁺ a₂⁺ a⁻ UNIVERSAL Q⁺ = Q, 1 answer query answer q q q q q q reply
The four attack objectives. The universal attack as well as the targeted attack Setting II use the target malicious reply: I will not reply to you!, while the targeted attack Setting I and Setting III use targeted malicious answers generated by GPT-4o.

Variants Based on Attacker Knowledge

We examine different levels of attacker knowledge through variants of the previous attack definition, varying from full white-box access to the black-box setting. In the black-box setting the attacker does not know the target models. We investigate three attack variants at increasing levels of difficulty for crafting malicious images: a Prompt-based Attack, a Direct Transfer Attack, and a Model Ensemble Attack.

White-box
Black-box

White-box Attack

In the white-box setting the attacker has full knowledge of and access to the embedding model E and the VLM G. This is the strongest assumption and thus yields the strongest attack. However, it is a practical concern due to potential insider threats and due to the proliferation of high-quality open-source text and multi-modal embedding models and VLMs, and the emergence of techniques to identify models based on their output.

Setting I
ASR-R@1 0.40–1.00 (1.00 for every CLIP-L pair); ASR-GSim 0.55–1.00
Universal
ASR-R@1 0.90–0.98 with CLIP-L, 0.00 with ColPali and GME; ASR-GSim 0.44–1.00

ViDoRe-V1-AI, mean values. ASR-GSim is ASR-GSim@−1.

Experiment Design

We evaluate the attacks on two visual document retrieval datasets taken from the ViDoRe benchmark versions 1 and 2. We use a mix of embedding models that range in size, recency, and target applications.

ComponentNameDetails
DatasetViDoRe-V1-AI100 queries and 1000 images (with exactly one relevant ground-truth image in the KB per query)
DatasetViDoRe-V2-ESG52 queries and 1538 images with an average of 2.5 relevant images per query
EmbedderCLIP-ViT-LARGE (CLIP-L)0.4B; trained using contrastive learning to achieve zero-shot image classification; not specifically trained for VDR; 7.2 million monthly downloads
EmbedderGME-Qwen2-VL-2B (GME)2.2B; fine-tuned from Qwen2-2B-VL on several tasks, including VDR; 30th on the ViDoRe benchmark
EmbedderColPali-v1.3 (ColPali)3B; state-of-the-art in visual document retrieval; ColBERT-style late embedding interaction with MaxSim; 37th on the ViDoRe benchmark
VLMSmolVLM-Instruct2.2B; 34th on OpenCompass (open-source, under 4B)
VLMQwen2.5-VL-3B-Instruct3.75B; 7th on OpenCompass (open-source, under 4B)
VLMInternVL3-2B2B; 8th on OpenCompass (open-source, under 4B)

We split the queries of each dataset into a set used to optimize the malicious image (80%) and a set to evaluate the attack for the universal objective (20%). For all the above models, unless otherwise stated, we assume the retriever only retrieves the top-1 relevant image from the KB.

Evaluation Metrics

We evaluate the RAG system and each attack using the following performance metrics for retrieval, where ↑ / ↓ denote their relation to the performance of the attacker:

Recall

The baseline fraction of queries for which R retrieves a relevant image before attack.

ΔRecall ↓

The change in the Recall of R after the attack, compared to the baseline Recall.

ASR-R ↑

The fraction of targeted queries for which the malicious image is retrieved by R.

And the following performance metrics for generation:

ASR-GSim ↑

The average embedding similarity between the VLM generated response for targeted queries and the target response. ASR-GSim = 1 means that the VLM outputs the target answer verbatim.

SIM-GNeg ↓

In the targeted setting, the average embedding similarity between the VLM-generated response for non-targeted queries and the target malicious response.

SIM-GGT ↓

The average embedding similarity between the VLM generated response for targeted queries and the ground truth response.

For all evaluation metrics, the superscript @k signifies that the metric is reported when the top-k relevant images are retrieved. Furthermore, we denote by @−1 that we force the malicious image to be retrieved as the only context image, which decouples the generation performance from retrieval, so we can report on the performance of each component of the attack individually. Similarity metrics are computed using the Jina-Embeddings-V3 text embedding model. We use an embedding model different from those employed by the VD-RAG system, and the attacks, to exclude the possibility of bias.

Attack Hyper-parameters

Hyper-parameterValue
Starting image I′0An arbitrary image that is not relevant to any query
RepeatsFive different initial images per attack
Gradient steps250, linear learning rate schedule from 3×10⁻³ to 3×10⁻⁴
Batch size8 user queries
Loss weightsλR = 2, λG = 1
Maximum image perturbation α8/255
Similarity in LRCosine similarity (MaxSim for ColPali)
ComputeNVIDIA H100 NVL GPU with 93GiB VRAM, approximately 325 GPU hours

We observe that attacks can almost perfectly satisfy both the retrieval and the generation conditions starting from α = 8/255. Therefore, in the rest of the paper, we consider only attacks with α = 8/255. Despite the success of the attack, the perturbed image is almost indistinguishable from the original.

Targeted Attack

1.00ASR-R@1 when CLIP‑L is the embedding model (white-box, Setting I)
0false positive rate across all settings
1.00white-box ASR-R@1 for every model pair on ViDoRe-V2-ESG
0.00ASR-R@1 of Complete Transfer and Out-set Model Ensemble

We empirically evaluate the vulnerability of VD-RAG to the targeted attack across three settings, with increasing number of targeted queries and answers: I) One Query, II) Multiple Queries, and III) Multiple Queries & Answers. Across all settings, the malicious image is never retrieved for unrelated queries, so the false positive rate (FPR) is always 0.

Setting I: One Query

In this setting, we target a single query in the dataset such that the malicious KB entry is retrieved and it induces the VLM to generate a specified malicious answer generated by GPT-4o.

Focusing on the white-box setting, the results show that an attacker with full knowledge of the target models can succeed in compromising the RAG system. For retrieval, the malicious image is always retrieved as the most relevant image for the target query when CLIP-L is the embedding model. For more sophisticated embedding models (i.e., ColPali and GME), the malicious image is almost always retrieved within the top-5 most relevant images. For generation, the generated answer is semantically similar to the target answer (ASR-GSim@−1 ≥ 0.8) for most model combinations. Note that ASR-GSim@−1 is relatively lower when ColPali or GME is used, as the attack optimization is not able to balance the retrieval and generation objectives. Further note that the malicious image has high specificity and does not influence the generated answers for untargeted queries, even when retrieved, as shown by the SIM-GNeg@−1 values.

Retrieval: ASR-R@1

White-box, Setting I, ViDoRe-V1-AI. Mean over five initial images.

CLIP-L
InternVL3-2B1.00
Qwen2.5-3B1.00
SmolVLM1.00
ColPali
InternVL3-2B0.60
Qwen2.5-3B0.40
SmolVLM0.60
GME
InternVL3-2B0.80
Qwen2.5-3B0.60
SmolVLM0.80
Show as table
EmbedderVLMASR-R@1ASR-R@5
CLIP-LInternVL3-2B1.001.00
CLIP-LQwen2.5-3B1.001.00
CLIP-LSmolVLM1.001.00
ColPaliInternVL3-2B0.601.00
ColPaliQwen2.5-3B0.400.80
ColPaliSmolVLM0.601.00
GMEInternVL3-2B0.801.00
GMEQwen2.5-3B0.601.00
GMESmolVLM0.801.00

Generation: ASR-GSim@−1

Same attacks, malicious image forced in as the only context. Mean over five initial images.

CLIP-L
InternVL3-2B1.00
Qwen2.5-3B0.89
SmolVLM0.98
ColPali
InternVL3-2B0.55
Qwen2.5-3B0.80
SmolVLM0.69
GME
InternVL3-2B0.97
Qwen2.5-3B1.00
SmolVLM0.99
Show as table
EmbedderVLMMeanMaxSIM-G NegΔ
CLIP-LInternVL3-2B1.001.000.210.00
CLIP-LQwen2.5-3B0.891.000.220.00
CLIP-LSmolVLM0.981.000.230.00
ColPaliInternVL3-2B0.550.840.210.00
ColPaliQwen2.5-3B0.801.000.220.01
ColPaliSmolVLM0.690.990.220.00
GMEInternVL3-2B0.971.000.220.01
GMEQwen2.5-3B1.001.000.210.00
GMESmolVLM0.991.000.220.00

Regarding the black-box attack variants, we observe no transferability between the models when applying the Direct Transfer Attack. The same applies for the Out-set Model Ensemble Attack (i.e., when the model ensemble does not include the actual models used). However, when the model ensemble includes the models employed in the VD-RAG system, the In-set Model Ensemble Attack achieves better performance, but still significantly lower than the White-box Attack.

Interestingly, the Prompt-based Attack shows higher success than other black-box variants, yielding different success rates dependent on the generative model. While Gemini-2.5-Flash creates images that get retrieved more often, GPT-5’s images are better at generating the target answer. Overall, our results highlight that black-box attacks are not effective against VD-RAG systems in the targeted setting, among which, the Prompt-based Attack achieve the highest relative success.

Setting II: Multiple Queries

The multiple target subvariant of the targeted attack optimizes the image to be retrieved and influence generation for a cluster of queries. When the image is retrieved, the VLM should generate the same answer for all of them. Therefore, the attack acts as an intermediate step between the base targeted attack and the universal attack. We target 5 queries: 1 attacker-chosen target query and its 4 nearest neighbors, computed by the Jina-Embeddings-V3 text embedding model. The rationale for using neighboring queries is to simulate the scenario in which the attacker wants to influence a range of queries related to a certain topic (e.g., elections, or a specific commercial product). The results confirm the findings from Setting I that attacks are more successful when CLIP-L is used, with success rates slightly lower than those in Setting I. Moreover, Prompt-based Attack are no longer useful when multiple queries are targeted.

Setting III: Multiple Queries & Answers

In this setting, the attack targets multiple unrelated queries with the intent of generating a different malicious answer for each query using a single image. We target queries 1 and 2 in the dataset and use GPT-4o to generate corresponding malicious target answers. Table 3 shows slightly better results than Setting II but slightly worse than Setting I, where white-box attacks are successful against both legacy and SoTA embedding models in this challenging setting.

EmbedderVLMASR-R@1, SettingASR-GSim@−1, Setting
IIIIIIIIIIII
CLIP-LInternVL3-2B1.000.801.001.000.830.88
CLIP-LQwen2.5-3B1.000.801.000.890.970.93
CLIP-LSmolVLM1.000.881.000.981.000.90
ColPaliInternVL3-2B0.600.120.600.55−0.020.57
ColPaliQwen2.5-3B0.400.120.600.800.460.66
ColPaliSmolVLM0.600.200.500.690.290.60
GMEInternVL3-2B0.800.200.500.970.780.77
GMEQwen2.5-3B0.600.240.401.001.000.89
GMESmolVLM0.800.200.500.990.930.79

White-box ASR-R@1 and mean ASR-GSim@−1 for Settings I, II and III on ViDoRe-V1-AI. Prompt-based Attack, averaged: ASR-R@1 0.01 in Setting II and 0.48 in Setting III.

Universal Attack

0.90–0.98white-box ASR-R@1 with CLIP‑L
0.00white-box ASR-R@1 with ColPali and GME
8 of 9white-box model pairs with ASR-GSim@−1 of 0.87 or more
−0.19largest ΔRecall@1, for CLIP‑L (baseline 0.21)

Focusing on the white-box attack, the universal attack produces images that are always retrieved for all queries (ASR-R@1 = 1) when the CLIP-L embedding model is used. To the contrary, state-of-the-art embedding models (ColPali-v1.3 and GME-Qwen2-VL-2B) never retrieve adversarial images as the top-1 relevant image but sometimes retrieve them within the top-5. Regarding generation, the universal attack consistently causes all VLMs to generate the target answer verbatim for almost all user queries in the test dataset. These results mirror those for the targeted attacks, where CLIP-L is the most vulnerable embedding model, while ColPali and GME remain robust to influences under all attacks.

Retrieval: ASR-R@1

White-box universal attack, ViDoRe-V1-AI test queries.

CLIP-L
InternVL3-2B0.97
Qwen2.5-3B0.98
SmolVLM0.90
ColPali
InternVL3-2B0.00
Qwen2.5-3B0.00
SmolVLM0.00
GME
InternVL3-2B0.00
Qwen2.5-3B0.00
SmolVLM0.00
Show as table
EmbedderVLMRecall@1ΔRecall@1ASR-R@1Recall@5ΔRecall@5ASR-R@5
CLIP-LInternVL3-2B0.21−0.190.970.44−0.011.00
CLIP-LQwen2.5-3B0.21−0.190.980.44−0.011.00
CLIP-LSmolVLM0.21−0.170.900.44−0.010.99
ColPaliInternVL3-2B0.670.000.000.980.000.05
ColPaliQwen2.5-3B0.670.000.000.980.000.05
ColPaliSmolVLM0.670.000.000.980.000.06
GMEInternVL3-2B0.580.000.000.940.000.19
GMEQwen2.5-3B0.580.000.000.940.000.17
GMESmolVLM0.580.000.000.940.000.13

Generation: ASR-GSim@−1

Same attacks, malicious image forced in as the only context. Mean over five initial images.

CLIP-L
InternVL3-2B0.96
Qwen2.5-3B1.00
SmolVLM1.00
ColPali
InternVL3-2B0.44
Qwen2.5-3B0.97
SmolVLM0.87
GME
InternVL3-2B1.00
Qwen2.5-3B1.00
SmolVLM0.99
Show as table
EmbedderVLMMeanMaxSIM-G GTΔ
CLIP-LInternVL3-2B0.961.000.04−0.51
CLIP-LQwen2.5-3B1.001.000.03−0.51
CLIP-LSmolVLM1.001.000.03−0.50
ColPaliInternVL3-2B0.440.890.30−0.25
ColPaliQwen2.5-3B0.971.000.04−0.51
ColPaliSmolVLM0.871.000.06−0.47
GMEInternVL3-2B1.001.000.03−0.52
GMEQwen2.5-3B1.001.000.03−0.52
GMESmolVLM0.991.000.03−0.50

ViDoRe-V2-ESG, white-box ASR-R@1: CLIP-L 0.71–0.73, ColPali 0.04–0.05, GME 0.00.

Robustness of SoTA Embedding Models to Universal Attacks

The UMAP visualizations show a distinct modality gap in CLIP-L, however, a minimal gap for ColPali and GME. This illustrates the difficulty of generating a single image that is retrieved for all queries in these embedding spaces, leading to their observed robustness.

This distinction might explain why it is feasible to attack the CLIP-ViT-LARGE model. It is possible to create an artificial image that closely aligns with all queries, as its embeddings cluster in the same region.

On the other hand, the ColPali-v1.3 and GME-Qwen2-VL-2B models lack a consolidated area that encompasses all queries, making it difficult, if not impossible, to generate an image that is in close proximity to all queries.

We consider 4 losses: (1) MaxSim, which is the original metric used by Colpali, (2) AvgSim, which replaces the max operator by the average, (3) SoftMaxSim, which replaces the max operator by softmax, and (4) CosAvg, which computes the cosine similarity of the averaged token embeddings for both queries and images. Changing the similarity measure would degrade robustness, however, it is not wholly responsible for the robustness of ColPali.

Context typeMaxSimAvgSimSoftMaxSimCosAvg
Image + Text0.000.250.150.05
Image Only0.000.250.050.05

Universal-attack ASR-R@1 against ColPali under each similarity measure.

Black-box attacks

For black-box attacks, those attacks are consistently unsuccessful against all model combinations. Even the In-set Model Ensemble Attack is only occasionally successful when CLIP-L is used.

Defenses

The literature lacks specialized defenses against VD-RAG poisoning attacks. Furthermore, most of the defenses proposed for textual RAG are not straightforwardly applicable to multi-modal settings and incur a significant drop in benign performance. Nevertheless, we evaluate the resistance of the attacks to several defenses used by previous works. We only evaluate the white-box attacks since these are the most successful in both the targeted and universal settings.

Knowledge Expansion

This defense works by retrieving a larger number of KB items with the intention of diluting the effect of the retrieved adversarial image. We expand the number of retrieved images from 1 to 5 images when evaluating this defense.

The results show that expanding the retrieved knowledge (using k = 5) can degrade the attack performance if the attack was only trained using k = 1. However, an adaptive attack trained specifically against this value of k using 10% of the knowledge base, can effectively evade this defense when CLIP-L is the employed embedding model. This applies for both targeted and universal attacks. We conclude from these results that knowledge expansion on its own does not guarantee robustness of the RAG system against the attacks.

AttackEmbedderTrained for k = 1Adaptive, k = 5
Targeted (Setting I)CLIP-L−0.050.57
Targeted (Setting I)ColPali−0.10−0.10
Targeted (Setting I)GME−0.11−0.07
UniversalCLIP-L−0.020.54
UniversalColPali−0.01−0.01
UniversalGME−0.020.02

Mean ASR-GSim@5 when five images are retrieved. Results only for SmolVLM due to computational constraints.

VLM-as-a-Judge

We use a VLM-as-a-Judge to evaluate the output on three metrics: (i) answer relevancy assesses if the answer is relevant to the query, (ii) context relevancy assesses if the retrieved images are relevant to the query, and (iii) answer faithfulness assesses if the answer is grounded in the retrieved images. We use the prompts proposed by Riedler & Langer (2024) to evaluate these metrics.

Qwen2.5-3B and InternVL3-2B as-a-judge demonstrate the capability to detect both universal and targeted attacks across all three metrics. SmolVLM-as-a-judge detects low answer relevancy for both attacks but performs worse in the other two metrics. These results show that adaptive attacks trained against the judge are able to bypass the defense, but there is no transferability of these attacks between judge models. We conclude that VLM-as-a-Judge is not able to improve the robustness of VD-RAG to the poisoning attacks.

Answer relevancy, by judge

Targeted white-box attack, combined across embedding models and VLMs.

InternVL3-2B judge
No judge loss0.01
Other VLMs0.01
Same judge0.86
Qwen2.5-3B judge
No judge loss0.03
Other VLMs0.03
Same judge1.00
SmolVLM judge
No judge loss0.22
Other VLMs0.20
Same judge0.99
Mean values.
Show all three metrics
AttackEval judgeJudge lossImage content relevancyImage faithfulnessAnswer relevancy
TargetedInternVL3-2BNone0.000.000.01
TargetedInternVL3-2BOther VLMs0.000.000.01
TargetedInternVL3-2BInternVL3-2B0.870.790.86
TargetedQwen2.5-3BNone0.010.010.03
TargetedQwen2.5-3BOther VLMs0.010.010.03
TargetedQwen2.5-3BQwen2.5-3B1.001.001.00
TargetedSmolVLMNone0.630.520.22
TargetedSmolVLMOther VLMs0.630.550.20
TargetedSmolVLMSmolVLM0.990.990.99
UniversalInternVL3-2BNone0.000.000.00
UniversalInternVL3-2BOther VLMs0.000.000.00
UniversalInternVL3-2BInternVL3-2B0.890.860.87
UniversalQwen2.5-3BNone0.020.010.01
UniversalQwen2.5-3BOther VLMs0.010.010.01
UniversalQwen2.5-3BQwen2.5-3B1.000.991.00
UniversalSmolVLMNone0.490.380.05
UniversalSmolVLMOther VLMs0.510.380.06
UniversalSmolVLMSmolVLM1.000.990.99

Query Paraphrasing

As proposed by Shafran et al. (2024), we asked a state-of-the-art LLM, specifically Llama-3.1-8B-Instruct, to paraphrase all queries in the ViDoRe-V1-AI and ViDoRe-V2-ESG datasets and then use the paraphrased queries when evaluating whether the attacks are still successful.

Our results shows that query paraphrasing is not an effective defense against the attacks (computed against the original queries). Across both the targeted (Setting I) and universal attack objectives, both the ASR-R@1 and ASR-GSim@−1 remained the same as in the white-box attacks. With the only noteworthy exception being a reduction in targeted ASR-R@1 for ColPali, dropping from 0.60 to 0.20.

Limitations

  • Since we only inject one image into the KB, the attacks can be easily detected by majority vote-based methods. However, these methods often increase the latency of the system, and might degrade the benign performance.
  • Extending the attacks to multiple images would likely improve the attack success rates, and is an interesting avenue for future work.
  • Similarly, future work should investigate the robustness of these attacks against real-world perturbations (e.g., JPEG compression, watermarking) that might be applied to images before being added into the KB.
  • Moreover, we could not evaluate the attacks against very large embedding models and VLMs due to compute constraints. Nevertheless, we conjecture that our attacks will succeed against larger models, as experimenting with model sizes between 256M to 4B parameters (spanning more than one order of magnitude) yielded very similar vulnerability.
  • We have also conducted our experiments on open-weight models only, as white-box attacks could only be evaluated against those. Investigating the vulnerability of proprietary closed-weight models to black-box attacks is an interesting direction for future work.

Conclusion

In this paper we demonstrate the vulnerability of VD-RAG systems to poisoning attacks. The attacks show that conventional embedding models and VLMs are vulnerable to adversarial perturbation and that a single injected image is capable of either spreading disinformation on targeted topics, or causing a DoS against the entire RAG system (impacting both retrieval and generation). While both white-box and black-box attacks are successful in the targeted setting, only white-box attacks succeed in the universal setting. We also observe the notable adversarial robustness of the ColPali and GME embedding models in the universal attack case; however, they still prove vulnerable to more targeted attacks. Beyond vanilla VD-RAG pipelines, we evaluate several common RAG defenses and find them to be ineffective against the poisoning attacks considered. This work provides the first steps towards fully characterizing the vulnerabilities of visual document RAG systems and helps guide the development of more robust designs.

  • We illustrate for the first time the vulnerability of VD-RAG systems to poisoning attacks.
  • We demonstrate that MO-PGD optimization allows an adversary to craft a single image that can cause either a DoS or targeted disinformation attack against the VD-RAG pipeline.
  • We show that multiple black-box attack variants can achieve success in the targeted attack setting.
  • We conduct over 5000 evaluations covering different datasets, models, settings, defenses, and images to identify the key factors that contribute to the success of the attacks.

Cite

@article{shereen2026OnePic,
      title={One Pic is All it Takes: Poisoning Visual Document Retrieval Augmented Generation with a Single Image},
      author={Ezzeldin Shereen and Dan Ristea and Shae McFadden and Burak Hasircioglu and Vasilios Mavroudis and Chris Hicks},
      journal={Transactions on Machine Learning Research},
      year={2026}
}