Connect the Dots: Knowledge Graph–Guided Crawler Attack on Retrieval-Augmented Generation Systems

Mengyu Yao, MOEKey Lab of HCST (PKU), School of Computer Science, Peking University; Ziqi Zhang and Ning Luo, University of Illinois Urbana-Champaign; Shaofei Li, Yifeng Cai, Xiangqun Chen, Yao Guo, and Ding Li, MOEKey Lab of HCST (PKU), School of Computer Science, Peking University

Stealing attacks pose a persistent threat to the intellectual property of deployed machine-learning systems. Retrieval-augmented generation (RAG) intensifies this risk by extending the attack surface beyond model weights to knowledge base that often contains IP-bearing assets such as proprietary runbooks, curated domain collections, or licensed documents. Recent work shows that multi-turn questioning can gradually steal corpus content from RAG systems, yet existing attacks are largely heuristic and often plateau early. We address this gap by formulating {RAG knowledge-base stealing} as an adaptive stochastic coverage problem (ASCP), where each query is a stochastic action and the attacker's goal is to maximize the conditional expected marginal gain (CMG) in corpus coverage under a query budget. Bridging ASCP to real-world black-box RAG knowledge-base stealing raises three challenges: CMG is unobservable, the natural-language action space is intractably large, and feasibility constraints require stealthy queries that remain effective under diverse architectures. We introduce RAGCrawler, a knowledge graph-guided attacker that maintains a global attacker-side state to estimate coverage gains, schedule high-value semantic anchors, and generate non-redundant natural queries. Across four corpora and four generators with BGE retriever, RAGCrawler achieves 66.8% average coverage (up to 84.4%) within 1,000 queries, improving coverage by 44.90% relative to the strongest baseline. It also reduces the queries needed to reach 70% coverage by at least $4.03x on average and enables surrogate reconstruction with answer similarity up to 0.699. Moreover, the attack remains effective under retriever switching and newer RAG techniques such as query rewriting and multi-query retrieval, while being difficult for existing defenses to block. These results highlight urgent needs to protect RAG knowledge assets.

USENIX Security '26 Open Access Sponsored by
King Abdullah University of Science and Technology (KAUST)

Open Access Media

USENIX is committed to Open Access to the research presented at our events. Papers and proceedings are freely available to everyone once the event begins. Any video, audio, and/or slides that are posted after the event are also free and open to everyone. Support USENIX and our commitment to Open Access.

BibTeX
@inproceedings {320607,
author = {Mengyu Yao and Ziqi Zhang and Ning Luo and Shaofei Li and Yifeng Cai and Xiangqun Chen and Yao Guo and Ding Li},
title = {Connect the Dots: Knowledge {Graph{\textendash}Guided} Crawler Attack on {Retrieval-Augmented} Generation Systems},
booktitle = {35th USENIX Security Symposium (USENIX Security 26)},
year = {2026},
isbn = {978-1-939133-58-8},
address = {Baltimore, MD},
pages = {6465--6484},
url = {https://www.usenix.org/conference/usenixsecurity26/presentation/yao-dots},
publisher = {USENIX Association},
month = aug
}