Retrieval-augmented generation (RAG) is widely used to ground large language models in external knowledge, but that external knowledge often comes from public or third-party sources. A new arXiv preprint argues this ingestion pipeline is a security weak point, and describes a poisoning attack that is specifically tailored to the way many large-scale RAG systems index their data.
The attack, called "Poisoning the Neighborhood," is topology-aware: it takes advantage of the hierarchical navigable small world (HNSW) graph structure that underpins many vector indexes. Rather than poisoning documents at random, the method places malicious content so that it becomes a close neighbour of legitimate, frequently retrieved topics. This makes the poisoned information more likely to be surfaced when a user queries the system.
The paper is described as a topic-level attack, meaning it targets entire subject areas rather than individual queries. The authors claim it works on large-scale HNSW-based RAG systems, which is a step beyond many earlier attacks that only demonstrated success on smaller setups. Since this is a single preprint, the results have not yet been peer-reviewed, and no independent verification is available. Still, the work highlights a growing concern: as RAG systems ingest untrusted data, the structure of their indexes may become an attack surface.{