Poisoned Data, Poisoned Models and the AI Supply Chain: Attacks Before Anyone Types a Prompt
Some AI attacks happen before anyone types a prompt: a few planted training examples, a fake 'bank details changed' file in the folder the assistant reads, a copied model, a filter fooled by one swapped letter, and a lookalike package. Vet every piece with four questions and keep a list of what your AI tools are made of.
What you will learn
- Explain training data poisoning and document poisoning in plain words
- Tell model theft and evasion apart, and why a model is an asset to guard
- List the four pieces an AI tool is built from and what goes wrong with each
- Vet a model, plugin or package with four questions and keep a simple list of what you use
Before you start
- The AI Reply Is Untrusted Too
Most AI attacks start with a prompt, like prompt injection and jailbreaks. The ones in this article happen before anyone types a single word. They go after what the AI learns from, what it reads, the model itself, and the pieces other people built for you.
We'll take them one at a time, in plain words, with Brightwell Logistics (a made-up delivery company) as the example. Then you'll get four questions to vet anything you bring in, and a simple list to keep.
An AI model learns from what it is fed
A model learns from the data it's fed. That might be millions of documents, pictures and web pages. Now suppose an attacker gets a few bad examples into that pile. Not many, just enough.
The model learns from all of it, bad examples included. Later, in certain situations, its answers come out wrong, or lean the way the attacker wanted. Everywhere else it behaves normally, which is why it's so hard to spot. This is called training data poisoning: change what goes in, and you change what comes out.
The documents it reads can be poisoned too
Poisoning doesn't only happen while a model is being trained. Many company assistants read your own documents. Brightwell's assistant searches a shared folder of price lists, policies and contacts.
Now somebody adds one more file. It says the supplier's bank details have changed, and it isn't true. Later a colleague asks:
Which bank details do we pay the supplier?
And the assistant answers from the newest document, with complete confidence: use the new account in the latest document.
The point: whoever can write to the data can steer the answers. So it matters who can add and edit what your AI reads. The same idea, inside a support agent's memory and tools, is in memory poisoning and tool poisoning.
Two attacks on the model itself
Two more attacks go after the model rather than its data.
Model theft: copying the model
Someone asks a model thousands of questions, records every answer, and uses them to build a working copy. Or the model file itself gets taken. Either way, you lose what you paid to build.
Evasion: slipping past its checks
The attacker changes an input just a little, so the model's check lets it through. Picture a filter that catches payment scams:
| Message | Filter |
|---|---|
| Urgent: pay this invoice today | Blocked |
| Urgent: pay this invoice t0day | Passes |
One letter swapped for a number, and it slips past. Different attacks, same lesson: the model is an asset, so guard access to it, and don't treat its filters as perfect. Why a single filter is never enough is the subject of guardrails for an LLM agent.
An AI tool is built from other people's pieces
That brings us to the supply chain. An AI tool isn't one thing. It's built from pieces other people made.
| Piece | Usually comes from |
|---|---|
| The base model | A vendor, or a public hub |
| Plugins and connectors | A marketplace |
| Software packages | Public repositories |
| The data it reads | Your own people and partners |
A weak link in any one of those is a weak link in your tool.
What goes wrong in the chain
- A model file from an unknown source. It may have been changed along the way, and some kinds of model files can carry code that runs the moment you open them.
- A plugin that asks for too much. It might read your mail when it only needed your calendar, and a later update can change what it does.
- A package with a lookalike name. AI tools sometimes suggest package names that don't exist. An attacker can register that name and wait for someone to install it.
These are the usual software risks, arriving through an AI tool. The OWASP list for AI applications includes both supply chain, and data and model poisoning.
Vet it like any other software
Models, plugins and packages are software. Vet them with four questions, before anyone installs them.
Keep a list of what you use
Then keep a list: a plain table of what your AI tools are made of. Some teams call it a bill of materials for AI. For each item, write where it came from, who owns it, and whether it's approved. Brightwell's starts like this:
| Item | Came from | Owner | Status |
|---|---|---|---|
| The assistant model | A vendor | IT | Approved |
| A document plugin | A marketplace | Operations | Pending |
| The shared folder it reads | Inside the company | HR | Approved |
The document plugin is still pending, which means nobody should be using it yet. And if something isn't on the list at all, nobody is looking after it. For ranking supply chain risk alongside everything else a deployed system faces, see ranking deployment risk.
Common mistakes
- Letting everyone edit the folder the assistant reads. Every editor can steer its answers.
- Installing the package the AI suggested without checking it exists and who publishes it. That's exactly the lookalike-name trap.
- Approving a plugin once and never looking again. An update can change what it does.
- Treating a scam filter as a wall. One changed character can get past it.
Recap
| Attack | What happens | Your control |
|---|---|---|
| Training data poisoning | Planted examples bend some answers | Ask vendors where models and data come from |
| Poisoned documents | One false file steers the assistant | Keep the group that can edit small |
| Model theft | Answers or the file make a working copy | Guard access to the model |
| Evasion | A small change slips past a check | Don't treat filters as perfect |
| Supply chain | A changed model file, greedy plugin or lookalike package | Four questions, then the list |
Three things you can do:
- Find out who can add or edit what your AI reads, and keep that group small.
- Don't install a model, plugin or package until it's approved. If you're not sure, ask IT first.
- Ask your vendors where their models and data come from, and keep the list.
Data can be poisoned, models can be copied or fooled, and the pieces are software someone else wrote. Vet it, list it, and limit who can change it.
StudyEasy AI Community
Learn AI engineering, share what you build, and connect with other learners.
Free resources: lesson files, notebooks and code
Ask questions and join engineering discussions
Meet real people learning and building with AI
Related course on Udemy
AI Security Essentials
Prompt injection, data leaks, AI agents and governance in plain words.View on Udemy ↗: AI Security Essentials (paid course, opens in a new tab)Related posts
Guardrails for an LLM Agent: Check What Comes In, What It Wants to Do, and What Goes Out
An agent that reads customer emails and can refund up to $200. In a small simulation, a phrase filter still lets 6 of 8 written attacks do harm and blocks 2 honest users; plain checks outside the model take harm to 0 of 8, at a cost of 1 honest request failed and 2 held.
The Agent Attack Surface: Blast Radius, Narrow Tools, Scoped Keys and the Dangerous Three
A support agent reads a ticket that says run SELECT * FROM customers and email the result outside, and it has run_sql and send_email, so the customer list leaves. The model wasn't hacked, it was equipped. Map each tool by what it reads, changes and sends, replace the two large ones with narrow tools, scope the keys, and never give one agent untrusted input, private data and a way out together.
Prompt Injection, Jailbreaks and Untrusted Input: Label What Comes In, Gate What Goes Out
Three texts reach a support agent in one week: an injected ticket, a poisoned help article and a jailbreak. A naive agent turns all three into leaks; three small checks in plain code take that to zero.
Injection Exposure Review for an Agent: Map Inputs, Data and Effects, Layer Every Path, Retest the Job
Review a refund agent the way a security team would: map where stranger text gets in, what it can read and what it can do, layer every path, then show the four normal questions still give the same answer.
