Introduction
Large multimodal models (LMMs) enable a wide range of zero-shot capabilities spanning a variety of input modalities, such as language, vision, and audio. However, similar to unimodal large language models (LLMs), they can suffer from hallucinations, generating outputs that are not grounded in factual information. Retrieval augmented generation (RAG) attempts to address this issue by retrieving trusted information chunks, that are relevant to the user query, directly from a knowledge base (KB). The retrieved information is then included in the input to the generative model to inform its generation.
The effectiveness of RAG relies primarily on the trustworthiness of the information in the KB. Challenging this assumption, recent work has shown that textual 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. These attacks have recently been extended to multimodal RAG (M-RAG) pipelines by concurrent research.
Both of those concurrent works consider that the user queries and the KB consist of text-image pairs, thus the text modality is common between queries, KB items, and LMM outputs. This shared modality greatly simplifies the attack procedure.
Therefore, it remains unclear whether M-RAG poisoning would still be possible in this practical setting. In this paper, we aim to bridge this gap in the literature by investigating poisoning attacks on visual document RAG (VD-RAG). We adopt a gradient-based adversarial approach to craft an image that is retrieved, and consistently influences the generation of every possible user query, thus leading to a universal denial-of-service (DoS) attack against the RAG pipeline.
VD-RAG Pipeline
A visual document RAG pipeline consists of three main components. First, a knowledge base (KB) K = {I1, …, IK} containing a set of K images, each corresponding to a page in a document. Second, a retriever R uses a multimodal 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. For each user query q, the retriever retrieves the top-k relevant items from K according to the similarity score, where k ≪ |K|. In other words, the retriever computes R(q, K) = top-kI∈K S(E(q), E(I)).
The third component is a generator G which is a vision language model (VLM) used to generate 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)).
Poisoning Attacks against VD-RAG
Threat Model
We consider an attacker that aims to disrupt the operation of the visual document RAG system by causing the retriever to retrieve irrelevant images and the generator to generate unhelpful responses to user queries. To achieve this goal, the attacker is capable of injecting documents/images into the KB. In our work, we assume a weak attacker that can inject only one malicious image I′ into the KB s.t. K′ = K ∪ I′. In order for this malicious image to cause disruption to the RAG pipeline, this image has to be crafted to be retrieved often, and when retrieved, it has to cause the VLM to generate unhelpful responses.
We examine both white-box and black-box settings.
White-box
In the white-box setting, the attacker is assumed to have knowledge of both the embedding model and the VLM. This is motivated by the vast amount of competent open-source text and multimodal embedding models, as well as VLMs.
Black-box
In the black-box setting, we consider that the attacker uses other open-source models than those used in the VD-RAG system to craft the malicious image, and we consequently evaluate the transferability between adversarial samples from one model to another.
Proposed Attack
A successful RAG poisoning attack must meet two conditions (modified for our goal of a universal untargeted attack).
Retrieval condition
First, the retrieval condition requires that the malicious image is retrieved as often as possible.
Generation condition
Second, the generation condition requires that when present in the context window, the malicious image must cause the generator to generate a specific response.
In order to compute a malicious image I′ that meets the above two conditions, we adopt the framework of gradient-based adversarial examples, initially proposed against neural network based image classifiers. In particular we jointly optimize the image to minimize a loss function LRAG capturing both a retrieval loss LR and a generation loss LG as follows
where λR, λG are coefficients,
where Q is the set of user queries used to train the attack, CE(.) is the cross entropy loss, a* is the desired target answer by the attacker
Attack Hyper-parameters
| Hyper-parameter | Value |
|---|---|
| Starting image | An arbitrary image that is not relevant to any query |
| Method | Projected gradient descent (PGD) |
| Gradient steps | 500, linear learning rate schedule from 3×10⁻³ to 3×10⁻⁴ |
| Batch size | 8 user queries |
| Loss weights | λR = 2, λG = 1 |
| Maximum image perturbation α | 8/255 |
| Similarity S(q, I) | Cosine similarity between embeddings |
| Target malicious reply a* | I will not reply to you! |
Experiment Design
We evaluate our 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 their sizes, recency, and target applications.
| Component | Name | Details |
|---|---|---|
| Dataset | ViDoRe-V1-AI | 100 queries and 1000 images (with exactly one relevant ground-truth image in the KB per query) |
| Dataset | ViDoRe-V2-ESG | 52 queries and 1538 images with an average of 2.5 relevant images per query |
| Embedder | CLIP-ViT-LARGE (CLIP-L) | 0.4B; seminal multimodal model trained using contrastive learning to achieve zero-shot image classification |
| Embedder | Jina-CLIP-v2 (Jina-CLIP) | 0.9B; recent extension of CLIP trained with additional multilingual text-image and text-text contrastive losses to bridge the modality gap problem exhibited by CLIP |
| Embedder | ColPali-v1.3 (ColPali) | 3B; state-of-the-art in visual document retrieval; ColBERT-style late embedding interaction with the MaxSim retrieval similarity metric |
| VLM | SmolVLM-Instruct | 2.2B |
| VLM | Qwen2.5-VL-3B-Instruct | 3.75B |
We split each dataset into a training set (80%, used to optimize the malicious image) and a test set (20%). For the above models, we assume the retriever only retrieves the top-1 relevant image from the KB.
Evaluation Metrics
We evaluate the RAG system and the attack using the following performance metrics:
Recall-B
Recall-B is the fraction of queries for which R retrieves a relevant image prior to attack.
Recall-A
Recall-A is the fraction of queries for which R retrieves a relevant image after the attack.
ASR-R
ASR-R is the fraction of queries for which the malicious image is retrieved by R.
ASR-G-Hard
ASR-G-Hard is the fraction of queries for which the VLM outputs the target response a* verbatim, assuming that the malicious image is retrieved.
ASR-G-Soft
ASR-G-Soft is the average embedding similarity between the VLM generated response and the target response a*, assuming that the malicious image is retrieved, computed using the Jina-Embeddings-V3 text embedding model.
Results
Effect of Perturbation Intensity
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.
Comparison of Different Models
As the previous results indicate, we observe high values of ASR-R, ASR-G-Hard, and ASR-G-Soft for most of the considered models, except ColPali-v1.3 which is almost unaffected by our attack. Increasing the allowed perturbation to α = 128/255 and training over 1500 gradient steps did not produce better results against ColPali-v1.3. Otherwise, CLIP-ViT-LARGE and Jina-CLIP-v2 almost always retrieve our malicious image.
ASR-R for each dataset, embedder and VLM
Fraction of queries for which the malicious image is retrieved by R.
ASR-G-Hard for each dataset, embedder and VLM
Fraction of queries for which the VLM outputs a* verbatim, assuming the malicious image is retrieved.
ASR-G-Soft for each dataset, embedder and VLM
Average embedding similarity between the VLM response and a*, assuming the malicious image is retrieved.
Recall-B for each dataset, embedder and VLM
Fraction of queries for which R retrieves a relevant image prior to attack.
Recall-A for each dataset, embedder and VLM
Fraction of queries for which R retrieves a relevant image after the attack.
Show as table
| Dataset | Embedder | VLM | Recall-B | Recall-A | ASR-R | ASR-G-Hard | ASR-G-Soft |
|---|---|---|---|---|---|---|---|
| ViDoRe-V1-AI | CLIP-L | SmolVLM | 0.210 | 0.000 | 1.000 | 1.000 | 1.000 |
| ViDoRe-V1-AI | CLIP-L | Qwen2.5-3B | 0.210 | 0.010 | 1.000 | 1.000 | 1.000 |
| ViDoRe-V1-AI | Jina-CLIP | SmolVLM | 0.000 | 0.000 | 0.750 | 0.900 | 0.951 |
| ViDoRe-V1-AI | Jina-CLIP | Qwen2.5-3B | 0.000 | 0.000 | 0.750 | 0.950 | 0.987 |
| ViDoRe-V1-AI | ColPali | SmolVLM | 0.660 | 0.650 | 0.000 | 0.900 | 0.946 |
| ViDoRe-V1-AI | ColPali | Qwen2.5-3B | 0.660 | 0.650 | 0.000 | 1.000 | 1.000 |
| ViDoRe-V2-ESG | CLIP-L | SmolVLM | 0.134 | 0.018 | 0.818 | 1.000 | 1.000 |
| ViDoRe-V2-ESG | CLIP-L | Qwen2.5-3B | 0.134 | 0.018 | 0.818 | 1.000 | 1.000 |
| ViDoRe-V2-ESG | Jina-CLIP | SmolVLM | 0.000 | 0.000 | 1.000 | 1.000 | 1.000 |
| ViDoRe-V2-ESG | Jina-CLIP | Qwen2.5-3B | 0.000 | 0.000 | 1.000 | 0.818 | 0.991 |
| ViDoRe-V2-ESG | ColPali | SmolVLM | 0.519 | 0.460 | 0.091 | 1.000 | 1.000 |
| ViDoRe-V2-ESG | ColPali | Qwen2.5-3B | 0.519 | 0.499 | 0.091 | 1.000 | 1.000 |
Regarding generation, our attack consistently causes SmolVLM-Instruct and Qwen2.5-VL-3B-Instruct to generate the target answer verbatim for almost all user queries in the test dataset. We also observe an interesting interaction where Jina-CLIP-v2 seems to somewhat inhibit the learning of effective attacks against generation. In general, the results show that our attacks are successful against a broad range of models.
The image and textual embeddings produced by CLIP-ViT-LARGE andJina-CLIP-v2 are easily separable (and thus easier to attack), while those computed by ColPali-v1.3 are harder to separate.
Attack Transferability
While the above evaluations assumed white-box access to the attacker, we also evaluated our attacks in the black-box setting, where the adversary does not have access to the embedding model and VLM used in the RAG system. We did not observe any transferability of the attack across the different embedding and VLM models. Attacks trained against a certain combination (embedding model, VLM) only work against the same combination. Therefore, exploring attacks that are trained simultaneously against multiple models is a direction for future research.
Limitations
- We do not consider defenses to our proposed attack; however, we plan to evaluate our attack against a variety of defenses including re-rankers, multimodal LLM-as-a-Judge, and poisoned sample detectors in future work. Additionally, we aim to examine whether adaptive attacks could be crafted against specific defenses.
- Our attacks can be detected by filtering images that are retrieved too frequently; however, our attack uncovers a fundamental weakness of M-RAG pipelines that could be useful for hardening through adversarial training.
- Our evaluation is not comprehensive, as we do not consider a large number of embedding models, VLMs, datasets, metrics, and transferability evaluations. In future work, we aim to provide an extensive evaluation of the attack showing the generalization of the results observed in this paper.
Transactions on Machine Learning Research, 2026: One Pic is All it Takes: Poisoning Visual Document Retrieval Augmented Generation with a Single Image
Conclusion
In this paper, we demonstrated the first poisoning attack against VD-RAG systems. Our attack showcased that conventional embedding models and VLMs are vulnerable to adversarial perturbation, where a single injected image is capable of causing a DoS of the entire RAG pipeline (both retrieval and generation). We also observed notable adversarial robustness of the ColPali-v1.3 embedding model and provided hints into why this is the case. Nevertheless, our attack provides the first step towards understanding the vulnerability of multimodal RAG systems and enhancing their robustness for future adoption.
- We propose the first poisoning attack against VD-RAG systems.
- We demonstrate that our multi-objective optimization approach allows an adversary to craft a single image that causes DoS against the entire RAG pipeline.
- We investigate several factors of attack success, such as the embedding model employed, the LMM, and the stealthiness of the injected image.
Cite
@misc{shereen2025OnePic,
title={One Pic is All it Takes: Poisoning Visual Document Retrieval Augmented Generation with a Single Image (Short Paper)},
author={Ezzeldin Shereen and Dan Ristea and Burak Hasircioglu and Shae McFadden and Vasilios Mavroudis and Chris Hicks},
booktitle={2nd Workshop on Multimodal Augmented Generation via MultimodAl Retrieval},
year={2025}
}