PIDP-Attack: Combining Prompt Injection with Database Poisoning Attacks on Retrieval-Augmented Generation Systems

📄 arXiv: 2603.25164v1 📥 PDF

作者: Haozhen Wang, Haoyue Liu, Jionghao Zhu, Zhichao Wang, Yongxin Guo, Xiaoying Tang

分类: cs.CR, cs.AI

发布日期: 2026-03-26


💡 一句话要点

提出PIDP-Attack,结合提示注入与数据库投毒攻击RAG系统

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 检索增强生成 RAG 提示注入 数据库投毒 对抗攻击

📋 核心要点

  1. RAG系统易受数据投毒攻击,现有方法需预知用户查询,限制了攻击的灵活性和实际应用。
  2. PIDP-Attack结合提示注入与数据库投毒,无需预知用户查询即可操纵LLM响应。
  3. 实验表明,PIDP-Attack在多个数据集和LLM上优于PoisonedRAG,攻击成功率提升4%-16%。

📝 摘要(中文)

大型语言模型(LLMs)在各种应用中表现出卓越的性能。然而,它们的实际部署常常受到知识过时和产生幻觉等问题的阻碍。为了解决这些限制,检索增强生成(RAG)系统被引入,利用外部、最新的知识源来增强LLM。尽管RAG系统具有优势,但它们仍然容易受到对抗性攻击,其中数据投毒成为一种突出的威胁。现有的基于投毒的攻击通常需要预先了解用户的特定查询,限制了它们的灵活性和实际应用性。在这项工作中,我们提出了PIDP-Attack,一种新颖的复合攻击,它将提示注入与RAG中的数据库投毒相结合。通过在推理时将恶意字符附加到查询中,并将有限数量的投毒段落注入到检索数据库中,我们的方法可以有效地操纵LLM对任意查询的响应,而无需预先了解用户的实际查询。在三个基准数据集(Natural Questions, HotpotQA, MS-MARCO)和八个LLM上的实验评估表明,PIDP-Attack始终优于原始的PoisonedRAG。具体而言,我们的方法在开放域问答任务中将攻击成功率提高了4%到16%,同时保持了较高的检索精度,证明了复合攻击策略既必要又非常有效。

🔬 方法详解

问题定义:论文旨在解决RAG系统中数据投毒攻击需要预先了解用户查询的问题。现有投毒攻击方法的痛点在于其灵活性不足,难以在实际应用中有效实施,因为攻击者通常无法提前获知用户的具体查询内容。

核心思路:论文的核心思路是将提示注入与数据库投毒相结合,构建一种复合攻击方法。通过在用户查询中注入恶意提示,引导LLM检索并利用数据库中预先注入的投毒信息,从而影响LLM的生成结果。这种方法无需预先了解用户的具体查询,即可实现对RAG系统的有效攻击。

技术框架:PIDP-Attack的整体框架包含两个主要阶段:1) 数据库投毒阶段:将精心设计的投毒段落注入到RAG系统的检索数据库中。2) 推理攻击阶段:在用户查询中附加恶意提示,诱导LLM检索包含投毒信息的段落,并生成受攻击者控制的响应。该框架利用提示注入来增强投毒攻击的效果,使其更具隐蔽性和有效性。

关键创新:PIDP-Attack的关键创新在于其复合攻击策略,即将提示注入与数据库投毒相结合。与传统的单一投毒攻击相比,PIDP-Attack无需预先了解用户查询,即可通过提示注入来引导LLM检索投毒信息,从而实现更灵活和有效的攻击。这种复合攻击策略显著提高了攻击的成功率和实用性。

关键设计:在提示注入方面,论文设计了特定的恶意字符或指令,以诱导LLM检索包含投毒信息的段落。在数据库投毒方面,论文可能采用了特定的投毒段落生成方法,以确保投毒信息能够被LLM有效利用。具体的损失函数和网络结构等技术细节可能与LLM的选择和投毒策略有关,论文中可能未详细描述。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果表明,PIDP-Attack在Natural Questions、HotpotQA和MS-MARCO三个基准数据集上,针对八个不同的LLM,均优于原始的PoisonedRAG攻击。具体而言,PIDP-Attack在开放域问答任务中将攻击成功率提高了4%到16%,同时保持了较高的检索精度,证明了复合攻击策略的有效性。

🎯 应用场景

该研究成果可应用于评估和增强RAG系统的安全性,尤其是在开放域问答、知识库问答等场景下。通过模拟PIDP-Attack,可以发现RAG系统中的潜在漏洞,并开发相应的防御机制,提高系统的鲁棒性和可靠性。此外,该研究也为开发更安全的LLM应用提供了新的思路。

📄 摘要(原文)

Large Language Models (LLMs) have demonstrated remarkable performance across a wide range of applications. However, their practical deployment is often hindered by issues such as outdated knowledge and the tendency to generate hallucinations. To address these limitations, Retrieval-Augmented Generation (RAG) systems have been introduced, enhancing LLMs with external, up-to-date knowledge sources. Despite their advantages, RAG systems remain vulnerable to adversarial attacks, with data poisoning emerging as a prominent threat. Existing poisoning-based attacks typically require prior knowledge of the user's specific queries, limiting their flexibility and real-world applicability. In this work, we propose PIDP-Attack, a novel compound attack that integrates prompt injection with database poisoning in RAG. By appending malicious characters to queries at inference time and injecting a limited number of poisoned passages into the retrieval database, our method can effectively manipulate LLM response to arbitrary query without prior knowledge of the user's actual query. Experimental evaluations across three benchmark datasets (Natural Questions, HotpotQA, MS-MARCO) and eight LLMs demonstrate that PIDP-Attack consistently outperforms the original PoisonedRAG. Specifically, our method improves attack success rates by 4% to 16% on open-domain QA tasks while maintaining high retrieval precision, proving that the compound attack strategy is both necessary and highly effective.