LeakDojo: Decoding the Leakage Threats of RAG Systems

Maosen Zhang, Jianshuo Dong, Boting Lu, Wenyue Li, Xiaoping Zhang +2 more
5/7/2026
cs.CRcs.AIcs.CL
rag

Official code: yeasen-z/LeakDojo (5 stars, Python, Apache-2.0, last commit 2026-09-27).

Abstract

Retrieval-Augmented Generation (RAG) enables large language models (LLMs) to leverage external knowledge, but also exposes valuable RAG databases to leakage attacks. As RAG systems grow more complex and LLMs exhibit stronger instruction-following capabilities, existing studies fall short of systematically assessing RAG leakage risks.

Show full abstract

We present LeakDojo, a configurable framework for controlled evaluation of RAG leakage. Using LeakDojo, we benchmark six existing attacks across fourteen LLMs, four datasets, and diverse RAG systems. Our study reveals that (1) query generation and adversarial instructions contribute independently to leakage, with overall leakage well approximated by their product; (2) stronger instruction-following capability correlates with higher leakage risk; and (3) improvements in RAG faithfulness can introduce increased leakage risk. These findings provide actionable insights for understanding and mitigating RAG leakage in practice. Our codebase is available at https://github.com/yeasen-z/LeakDojo.

View on arXivView PDF

Code Implementations(1)

yeasen-z/LeakDojoOfficial100%
Apache-2.0

[ACL 2026 Findings] "LeakDojo: Decoding the Leakage Threats of RAG Systems"

51Python, Jupyter NotebookSep 2, 20252 months agoApache-2.0

Similar Papers

Cite this paper

@article{zhang2026leakdojo,
  title  = {LeakDojo: Decoding the Leakage Threats of RAG Systems},
  author = {Maosen Zhang and Jianshuo Dong and Boting Lu and Wenyue Li and Xiaoping Zhang and Tianwei Zhang and Han Qiu},
  year   = {2026},
  eprint = {2605.05818},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2605.05818v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2605.05818.svg)](https://codeofpaper.com/paper/2605.05818)

Discussion