Subgraph Reconstruction Attacks on Graph RAG Deployments with Practical Defenses

Minkyoo Song, Jaehan Kim, Myungchul Kang, Hanna Kim, Seungwon Shin, Sooel Son

Abstract

Graph-based retrieval-augmented generation (Graph RAG) is increasingly deployed to support LLM applications by augmenting user queries with structured knowledge retrieved from a knowledge graph. While Graph RAG improves relational reasoning, it introduces a largely understudied threat: adversaries can reconstruct subgraphs from a target RAG system's knowledge graph, enabling privacy inference and replication of curated knowledge assets. We show that existing attacks are largely ineffective against Graph RAG even with simple prompt-based safeguards, because these attacks expose explicit exfiltration intent and are therefore easily suppressed by lightweight safe prompts. We identify three technical challenges for practical Graph RAG extraction under realistic safeguards and introduce GRASP, a closed-box, multi-turn subgraph reconstruction attack. GRASP (i) reframes extraction as a context-processing task, (ii) enforces format-compliant, instance-grounded outputs via per-record identifiers to reduce hallucinations and preserve relational details, and (iii) diversifies goal-driven attack queries using a momentum-aware scheduler to operate within strict query budgets. Across two real-world knowledge graphs, four safety-aligned LLMs, and multiple Graph RAG frameworks, GRASP attains the strongest type-faithful reconstruction where prior methods fail, reaching up to 82.9 F1. We further evaluate defenses and propose two lightweight mitigations that substantially reduce reconstruction fidelity without utility loss.

Introduction: The Vulnerability of Structured Knowledge

Retrieval-Augmented Generation (RAG) has evolved beyond simple text chunks to incorporate structured knowledge graphs. Modern "Graph RAG" systems organize information into entities and relationships (e.g., Person A $\xrightarrow{owns}$ Service B), enabling LLMs to perform complex relational reasoning. However, this structure is a double-edged sword: it provides a roadmap for adversaries to systematically map out an organization’s internal hierarchy, proprietary ontologies, or private medical data.

Existing data extraction attacks typically rely on direct exfiltration—asking the LLM to "repeat the retrieved context." These are easily defeated by simple "safe prompts" that instruct the AI not to disclose sources verbatim. This research identifies a critical gap: the lack of a reliable method to reconstruct structured graph data from a "closed-box" system that is actively defending itself.

The GRASP Attack Framework

To address this, the authors developed GRASP (Graph RAG Reconstruction Attack for Subgraph Profiling), a multi-turn attack designed to bypass safety filters through three key strategies:

  1. Task Reframing: Instead of requesting a raw data dump, GRASP reframes the attack as a legitimate-looking relation extraction task. It asks the model to "identify relations incident to the target entity" from the provided context, a request that safety filters often overlook.
  2. Instance-Level Delimiting: To prevent the LLM from hallucinating or merging disparate records, GRASP enforces a quadruple format: (ID, SRC, RTYPE, DST). By requiring a specific identifier for every record, the attacker ensures the output is grounded in actual retrieved data.
  3. Momentum-Aware Scheduling: Operating within a limited query budget, GRASP uses an adaptive scheduler that tracks "momentum" (the rate of new information discovery) to switch between exploitation (deepening known relations), exploration (steering toward new relation types), and recovery (using anchor frames to nudge the retriever).
Overview of the GRASP multi-turn attack on a closed-box Graph RAG system, illustrating the extraction of 1-hop subgraphs.

Experimental Setup and Datasets

The attack and defenses were evaluated using two real-world datasets representing high-stakes privacy environments:

  • Enron Email Corpus: 5,000 emails simulating an enterprise assistant containing sensitive corporate relationships.
  • HealthCareMagic (HCM): A medical dialogue corpus simulating a healthcare chatbot containing private diagnoses and treatment plans.

These were tested against four major safety-aligned LLMs across multiple Graph RAG frameworks.

Key Results and Insights

GRASP achieved a "type-faithful" reconstruction F1 score of up to 82.9, whereas prior state-of-the-art attacks often dropped to near zero when simple safety prompts were enabled. The research highlights that safety prompts are brittle; they fail against "process this context" tasks because the LLM's core reasoning utility is exactly what the attacker exploits.

Extraction recall comparison showing how safety prompts suppress baseline attacks (P_Worm, P_FG) while GRASP-related strategies maintain higher fidelity.

Furthermore, the study found that hallucination is a primary obstacle for attackers. GRASP’s use of per-record identifiers (IDs) boosted reconstruction precision from 34.4% to 64.9% by grounding the model's output.

Proposed Defenses

The authors proposed two lightweight defenses that significantly reduce reconstruction fidelity without impacting utility:

  • ID Alignment: Assigning all retrieved records the same ID (e.g., "1") to confuse the LLM's ability to distinguish between individual relations.
  • Decoy: Injecting fake "entity" columns that do not match the actual data, steering the attacker toward plausible but incorrect results.

These defenses reduced the attack's F1 score to the mid-teens while maintaining the system's benign utility at nearly 100%.

Conclusion

While GRASP currently focuses on one-hop subgraphs, it demonstrates a significant privacy risk in Graph RAG deployments. Future work may explore multi-hop extraction or more advanced anomaly detection. The study concludes that while the proposed lightweight defenses are effective, the community requires more robust, Graph RAG-specific protections as LLMs become more adept at following complex instructions.

Summary updated

BibTeX
@misc{song2026subgraph,
  author = {Minkyoo Song and Jaehan Kim and Myungchul Kang and Hanna Kim and Seungwon Shin and Sooel Son},
  title = {{Subgraph Reconstruction Attacks on Graph RAG Deployments with Practical Defenses}},
  year = {2026},
  eprint = {2602.06495},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2602.06495},
}
Figure