Oracle Poisoning: Corrupting Knowledge Graphs to Weaponise AI Agent Reasoning
This paper introduces and empirically validates "Oracle Poisoning," a novel attack vector where adversaries corrupt structured knowledge graphs to force AI agents into drawing incorrect conclusions via otherwise sound reasoning, demonstrating that current models universally trust poisoned data when accessed through tool-use protocols and highlighting critical evaluation gaps in inline testing.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
The Core Idea: The "Trusted Librarian" Trap
Imagine you have a brilliant AI assistant (the "Agent") that helps you write code or check for security holes. This assistant is incredibly smart and reasons perfectly. However, it has a major weakness: it is blind to the outside world.
To do its job, the AI relies entirely on a massive, structured digital library called a Knowledge Graph. Think of this graph as a giant map of your entire software codebase, showing how every piece of code connects to every other piece.
The AI treats this map as an Oracle—a source of absolute truth. It doesn't question the map; it assumes the map is 100% accurate. If the map says "Function A calls Function B," the AI believes it without checking a second source.
Oracle Poisoning is the attack where a bad actor sneaks into the library and changes the map. They don't break the AI's brain; they don't trick the AI with confusing words. Instead, they quietly alter the facts on the map. Because the AI is so good at reasoning, it takes these new, fake facts and draws a perfectly logical—but completely wrong—conclusion.
The Analogy: Plato's Cave and the Shadow Wall
The authors compare this to Plato's Cave.
- The Prisoner: The AI Agent.
- The Wall: The Knowledge Graph.
- The Shadows: The answers the AI gets when it asks the graph questions.
- The Chain: The protocol (called MCP) that binds the AI to the wall, forcing it to accept the shadows as reality.
If an attacker paints a fake shadow on the wall, the prisoner (the AI) will study it, analyze it perfectly, and conclude, "That is a real tiger," even though it's just a painting. The more intelligent the prisoner, the more detailed and convincing their wrong conclusion will be.
How the Attack Works (The "How-To")
The researchers tested this on a real-world system with 42 million nodes (a massive digital library). They found that an attacker only needs to make tiny, surgical changes to the map to fool the AI.
They demonstrated six ways to do this:
- The Fake Package: Creating a fake software package in the library that looks like the "latest, most secure version," tricking the AI into recommending it.
- The Invisible Sanitizer: Adding a fake "security guard" function to the map that doesn't actually exist in the real code. The AI sees it on the map and concludes, "Ah, this code is safe!" when it is actually vulnerable.
- The Property Swap: Changing the details of a real piece of code on the map (e.g., changing a label from "unverified" to "security-approved") without creating a new fake item.
The Result: The AI, reasoning perfectly based on the new data, confidently tells developers, "This code is safe," or "Use this new library," leading them straight into a trap.
The "Sophistication" of the Attacker
The paper found something surprising: You don't need to be a genius hacker to pull this off.
- Level 0 (Naive): If the fake data looks suspicious (e.g., named "hacker_tool_v1"), the AI ignores it.
- Level 1 (Basic): If it looks okay but has small errors, the AI is sometimes fooled.
- Level 2 (Competent): If the fake data follows standard naming rules and looks professional, 100% of the AI models tested were completely fooled.
It's not a question of if the AI can be tricked, but how much effort the attacker needs to spend. A competent attacker can fool even the smartest AI models 100% of the time.
The "Delivery Mode" Surprise
The researchers discovered a critical flaw in how we usually test AI security.
- Inline Testing: If you show the fake data to the AI as a simple text message, some models (like GPT-5.1) say, "That looks suspicious," and reject it.
- Tool-Use Testing: If the AI gets the same fake data through its official "tool" connection (the way it works in real life), it trusts it 100%.
The Lesson: Testing AI security by just chatting with it (inline) gives a false sense of safety. When the AI uses its tools to look up data, it drops its guard completely.
How to Defend Against It
The paper tested several defenses and found that no single "silver bullet" works, but a combination helps:
- Read-Only Access (The Best Defense): If you lock the Knowledge Graph so that the AI (and the attacker) can only read the map but never write to it, the attack is impossible. This is the most effective fix.
- Cross-Checking: If the AI is forced to check the map against a second source (like the actual code files), it can spot the lie. If the map says "Safe" but the code file says "Vulnerable," the AI gets confused and stops trusting the map.
- The "Devil's Advocate": Asking the AI, "Could this data be fake?" helps, but only if you are very specific about how it might be fake. Just asking "Are you sure?" generally doesn't work.
- History Tracking: Keeping a log of what changed on the map helps detect new fake items, but it fails to catch when an attacker simply edits an existing item's details.
Summary
Oracle Poisoning is a new type of hack where the attacker corrupts the data the AI trusts, not the AI itself. Because the AI is so good at following logic, it happily builds a house of cards on a foundation of lies. The paper proves that in a real-world setting, almost every AI model tested will believe these lies if they come through a trusted tool channel, and the only reliable fix is to stop the AI from being able to write to its own knowledge base.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.