GraphRAG under Fire

Jiacheng Liang †∗ Yuhui Wang †∗ Changjiang Li † Tanqiu Jiang † Rongyi Zhu † Neil Gong ‡ Ting Wang † · 2025

Read GraphRAG under Fire by Jiacheng Liang †∗ Yuhui Wang †∗ Changjiang Li † Tanqiu Jiang † Rongyi Zhu † Neil Gong ‡ Ting Wang † (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2501-14050.txt.

Introduction

Researchers attack in 2025 a graph-based upgrade of retrieval systems for language models to test its security. The upgrade, GraphRAG, sorts outside knowledge into graphs so models can blend broad and fine facts. Its safety under poisoning attack was untested.

Standard poisoning loses power under the graph design, since graph sorting blunts single fake texts. Yet shared links in the graph open a new door. Their attack, GragPoison, plants false links, boosts their pull, and wraps them in smooth stories. One planted text can then sway many queries at once. Tests show up to 98 percent success with less fake text than older attacks. Early shields are probed as well.

Catalog record

CREATORJiacheng Liang †∗ Yuhui Wang †∗ Changjiang Li † Tanqiu Jiang † Rongyi Zhu † Neil Gong ‡ Ting Wang †
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE101 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2501-14050

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

GraphRAG under Fire Thanks: ∗ : The first two authors contributed equally. Jiacheng Liang †∗ Yuhui Wang †∗ Changjiang Li † Tanqiu Jiang † Rongyi Zhu † Neil Gong ‡ Ting Wang † Abstract GraphRAG advances retrieval-augmented generation (RAG) by structuring external knowledge as multi-scale knowledge graphs, enabling language models to integrate both broad context and granular details in their generation. While GraphRAG has demonstrated success across domains, its security implications remain largely unexplored. To bridge this gap, this work examines GraphRAG’s vulnerability to poisoning attacks, uncovering an intriguing security paradox: existing RAG poisoning attacks are less effective under GraphRAG than conventional RAG, due to GraphRAG’s graph-based indexing and retrieval; yet, the same features also create new attack surfaces. We present GragPoison , a novel attack that exploits shared relations in the underlying knowledge graph to craft poisoning text capable of compromising multiple queries simultaneously. GragPoison employs three key strategies: i ) relation injection to introduce false knowledge, ii ) relation enhancement to amplify poisoning influence, and iii ) narrative generation to embed malicious content within coherent text. Empirical evaluation across diverse datasets and models shows that GragPoison substantially outperforms existing attacks in terms of effectiveness (up to 98% success rate) and scalability (using less than 68% poisoning text) on multiple variants of GraphRAG. We also explore potential defensive measures and their limitations, identifying promising directions for future research. 1 1 1 All the source code and data are publicly available: https://github.com/JACKPURCELL/GraphRAG_Under_Fire I Introduction Large language models (LLMs) have demonstrated exceptional capabilities in language understanding, reasoning, and generation [ 1 , 2 , 3 ] . However, their applications face key challenges due to training data limitations: while real-world knowledge evolves continuously, LLMs remain fixed at their training cutoff dates; further, their training data often lacks in comprehensive representation for specialized domains such as medicine and cyber-security. Such knowledge gaps often manifest as hallucinations and biases in answering temporal and domain-specific queries [ 4 ] . To tackle such limitations, retrieval-augmented generation (RAG) [ 5 , 6 ] integrates LLMs with external knowledge bases. For each incoming query, RAG retrieves relevant information, adds it to the prompt, and generates responses using both the query and retrieved context, as illustrated in Figure 1 . Particularly, GraphRAG [ 7 , 8 , 9 , 10 ] emerges as one leading RAG paradigm. By converting external knowledge ( e.g. , text corpora) to a multi-scale knowledge graph, where nodes and edges represent entities and their relations, along with graph community summaries and segmented text chunks, GraphRAG effectively integrates external knowledge to enhance LLM generation, substantially reducing hallucinations and biases [ 7 ] . Fig. 1 : Poisoning attacks on GraphRAG. Despite success across various domains, RAG-based models are often vulnerable to adversarial poisoning attacks, due to their fundamental reliance on external information to construct knowledge bases [ 11 ] . These attacks, where adversaries inject carefully crafted malicious content into knowledge bases to compromise LLM generation, have been extensively studied for conventional RAG frameworks [ 12 , 13 , 14 , 15 ] . In comparison, GraphRAG’s security implications remain largely unexplored, raising key questions: RQ1: Are existing RAG poisoning attacks still effective under GraphRAG? RQ2: What unique vulnerabilities does GraphRAG have? RQ3: What potential defensive measures exist? Our Work. To bridge this critical gap, we conduct a systematic study on GraphRAG’s vulnerability to poisoning attacks, revealing the following key insights: i ) Existing RAG poisoning attacks are significantly less effective under GraphRAG. Recall that GraphRAG represents external knowledge as a multi-scale graph ( e.g. , entities, relations, and communities), and its graph-based indexing and retrieval pipeline often disrupts the intended effect of existing poisoning attacks: clean knowledge helps neutralize malicious content during indexing, while the graph structure effectively guides LLM reasoning and enables self-correction during inference. These design properties hinder existing attacks such as PoisonedRAG , which rely on directly embedding misleading answers near target queries in the retrieval corpus. Our empirical findings (see § III ) show that such query-specific poisoning strategies suffer sharp performance degradation on GraphRAG compared to conventional RAG. With the increasing number of target queries, existing poisoning attacks [ 16 ] that generate query-specific malicious content become less practical due to the prohibitive computational cost, and more detectable due to the large corpus of poisoned text [ 17 , 18 ] . ii ) Meanwhile, the same features create new attack surfaces. We present GragPoison , an effective and scalable black-box poisoning attack that exploits GraphRAG’s graph-based indexing and retrieval. Intuitively, queries sharing relations in the knowledge graph can be attacked simultaneously. For instance, consider two queries “ How to mitigate the malware Stuxnet? ” and “ How to detect the malware Stuxnet ”, both relying on the relation “ Stuxnet uses DLL Injection ”. Rather than attacking each query separately, injecting a false relation “ Stuxnet uses Process Hollowing ” into the knowledge graph allows GragPoison to compromise both queries together, improving both attack effectiveness and scalability. Specifically, GragPoison assumes the adversary can only inject limited poisoning text into GraphRAG’s text corpora, without access to GraphRAG’s other components. At a high level, GragPoison crafts the poisoning text in three key steps. 1 ) Relation selection – It identifies critical relations shared across multiple target queries by analyzing their embedded relations; 2 ) Relation injection – For each selected relation, it generates a false substitute ( e.g. , replacing “ Stuxnet uses DLL Injection ” with “ Stuxnet uses Process Hollowing ”); 3 ) Relation enhancement – It further strengthens each injected relation by adding supporting relations ( e.g. , “ Process Hallowing is detectable by Process Creation ”). To resolve potential conflicts between poisoning and clean text, it employs an adversarial LLM to generate coherent narratives that naturally embed the malicious content. Notably, while GragPoison exploits GraphRAG’s graph-based indexing and retrieval, it differs fundamentally from conventional graph poisoning attacks [ 19 , 20 , 21 , 22 ] in critical aspects. Graph poisoning attacks assume explicit knowledge about the graph structures, whereas GragPoison must infer these underlying structures through query analysis. Further, conventional attacks directly manipulate graph structures or node/edge features/embeddings, while GragPoison generates textual narratives that poison the source corpus. This creates a range of non-trivial challenges, including how to accurately infer the underlying graph structures and how to ensure the false information becomes indexed by GraphRAG, preferentially retrieved for relevant queries, and ultimately trusted by the generator LLM, even potentially overriding conflicting legitimate information in the context. Empirical evaluation across multiple GraphRAG variants ( e.g. , GraphRAG [ 7 ] and LightRAG [ 8 ] ) and datasets ( e.g. , geographic, medical, and cyber-security) demonstrates that GragPoison substantially outperforms existing attacks in terms of attack effectiveness (achieving up to 98% success rate) and scalability (using 68% less poisoning text). iii ) GragPoison is resilient to representative defenses. We examine various defenses against poisoning attacks, including leveraging LLMs’ built-in knowledge to combat poisoning knowledge, paraphrasing incoming queries, and detecting false responses based on chain-of-thought (CoT) consistency. However, GragPoison remains effective against these countermeasures, suggesting that GragPoison exploits GraphRAG’s fundamental vulnerabilities and requires tailored defenses. Our Contributions. To the best of our knowledge, this represents

Read the complete text