Safety & security

Data Poisoning

AI-assisted editorial review:

An AI security attack that mixes manipulated material into a model's training, fine-tuning or embedding data to plant vulnerabilities, backdoors or bias.

What does Data Poisoning mean in simple terms?

AI models learn patterns by reading large amounts of data. Data poisoning is an attack that deliberately mixes contaminated material into that training data so the model learns the wrong habits. Planting a hidden trigger that makes the model give strange answers whenever a certain word appears is called a backdoor. Because large language models learn heavily from public text on the internet, the problem is that anything anyone posts can end up in the training data. The same principle applies when a company fine-tunes on its own documents or builds a RAG knowledge base.

How can Data Poisoning be explained with an analogy?

It is like someone secretly slipping a note saying "use sugar instead of salt" into the recipe book a chef follows.

Where is Data Poisoning used?

Case 1

Anthropic, the UK AI Security Institute and the Alan Turing Institute — The 250-document experiment

On October 9, 2025, Anthropic released joint research showing that as few as 250 malicious documents can create a backdoor in a large language model.[1] The experiments covered models from 600 million to 13 billion parameters, and 250 documents amounted to 0.00016% of the training tokens.[1]
Result: Showed that the number of documents needed for poisoning may stay nearly constant regardless of model size (for a narrow backdoor that outputs gibberish after a specific phrase).[1]

Case 2

OWASP — Classified as LLM04 in the top 10 LLM risks

In its 2025 list, the OWASP Gen AI Security Project places data and model poisoning at LLM04 and defines it as pre-training, fine-tuning or embedding data being manipulated to introduce vulnerabilities, backdoors or bias.[2] It also warns that model files containing malicious code can spread through shared model repositories.[2]
Result: Set out checks such as verifying the origin of training data and restricting access as a shared industry baseline (per the OWASP 2025 list).[2]

Learning steps, limitations and developments

  1. List the source and author of each document you use for fine-tuning or RAG.
  2. Do not connect wikis or shared folders that anyone can edit directly to a knowledge base.[2]
  3. If you receive a model file from an external source, verify that it came from the official distribution channel.[2]
  4. If important answers suddenly go wrong, check the most recently added material first.

The Anthropic experiment dealt with a narrow backdoor that makes the model output gibberish, so it has not yet been confirmed whether the same result holds for more complex malicious behavior.[1] Still, the fact that a small amount of contamination can have an effect makes one implication clear: managing where training material comes from matters more than how much of it there is.

How has Data Poisoning evolved?

2025
OWASP LLM04:2025
Data and model poisoning is listed among the top 10 LLM risks.
2025.10
250-document experiment
Results show that a small number of malicious documents can create a backdoor.

Which concepts are related to Data Poisoning?

  • Attack point
    Pre-trainingContamination slips in while learning from public web material
  • Attack point
    Fine-tuningThe same risk applies to extra training on company material
  • Related architecture
    Retrieval-Augmented GenerationAnswers waver when knowledge base documents are contaminated
  • Response
    Red TeamingAttack testing to find hidden backdoors

Data Poisoning vs Prompt Injection

ComparisonData poisoningPrompt injection
When the attack happensTraining and fine-tuningUse (inference)
TargetTraining data and knowledge basesInput going into the model
How long it lastsStays in the model for a long timeOccurs in that conversation or task
Main responseManage and verify data sourcesLeast privilege and separating inputs

Which sources explain Data Poisoning?

  1. Anthropic — A small number of samples can poison LLMs of any size (2025-10-09) — https://www.anthropic.com/research/small-samples-poison
  2. OWASP Gen AI Security Project — LLM04:2025 Data and Model Poisoning (2025) — https://genai.owasp.org/llmrisk/llm042025-data-and-model-poisoning/