When we review dependencies we check npm, PyPI and NuGet. AI apps add three kinds of dependency that rarely get the same review: model files, packages an AI assistant suggests, and the MCP servers your agents call.
OWASP lists Supply Chain (LLM03) and Data and Model Poisoning (LLM04) in its 2025 Top 10 for LLM applications (OWASP, 2025). Each of the three below is a real, documented route in.
1. A model file can run code
JFrog found around 100 malicious models on Hugging Face, some carrying hidden backdoors (JFrog, 2024). The reason is the file format. Hugging Face warns of "dangerous arbitrary code execution attacks" when you load a pickle file, and offers safetensors as the safe alternative (Hugging Face, 2026). My rule: safetensors only, from publishers you can name.
2. Your assistant may suggest packages that don't exist
A USENIX Security study of code-writing models found that at least 5.2% of suggested packages from commercial models, and 21.7% from open-source models, did not exist. It collected 205,474 unique hallucinated names (USENIX, 2025). An attacker can publish malware under exactly those names and wait.
Share of suggested packages that did not exist (at least)
3. An MCP server is code running with your access
Invariant Labs described tool poisoning: "malicious instructions are embedded within MCP tool descriptions that are invisible to users but visible to AI models" (Invariant, 2025). Install MCP servers like any other dependency: pinned, reviewed, and given the least access. For scoping an agent's tools, see Beyond the Chatbot.
| Dependency | Risk | Control |
|---|---|---|
| Model files | Code runs on load | Safetensors only; named publishers |
| Suggested packages | Malware under invented names | Verify existence and publisher before install |
| MCP servers | Hidden instructions in tool descriptions | Pin versions; read every tool description |
How exposed is your AI supply chain?
Score each 0 (no), 1 (partly) or 2 (yes):
- Inventory: every model, package and MCP server is listed with an owner.
- Formats: no pickle files load from outside sources.
- Packages: new dependencies are checked by a person before install.
- Pinning: models and MCP servers are pinned to reviewed versions.
- Data: knowledge-base sources are known and access-controlled.
| Score | Next move |
|---|---|
| 8–10 | Add these checks to your release review. |
| 5–7 | Build the inventory first; it shows the rest. |
| 0–4 | Freeze new models and MCP servers until it exists. |
Your next step
This week, list every model file, AI-suggested package and MCP server in one product. Put an owner and a version next to each. Anything nobody owns, remove.
Sources
- OWASP (2025). LLM03:2025 Supply Chain and LLM04:2025 Data and Model Poisoning.
- JFrog (2024). Data Scientists Targeted by Malicious Hugging Face ML Models with Silent Backdoor. 27 February 2024.
- Hugging Face (2026). Pickle Scanning and Safetensors. Read 20 November 2026.
- USENIX (2025). Spracklen et al., We Have a Package for You! A Comprehensive Analysis of Package Hallucinations by Code Generating LLMs. USENIX Security 2025.
- Invariant (2025). MCP Security Notification: Tool Poisoning Attacks. 1 April 2025.