← Blog

· 3 min read

Your AI Supply Chain Is an Attack Surface: Models, Packages and MCP Servers

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)

Check that a package exists, and who publishes it, before you install it.

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.

Three AI dependencies and one control each (my recommendation)
DependencyRiskControl
Model filesCode runs on loadSafetensors only; named publishers
Suggested packagesMalware under invented namesVerify existence and publisher before install
MCP serversHidden instructions in tool descriptionsPin 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.
What your score means (my recommendation)
ScoreNext move
8–10Add these checks to your release review.
5–7Build the inventory first; it shows the rest.
0–4Freeze 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

  1. OWASP (2025). LLM03:2025 Supply Chain and LLM04:2025 Data and Model Poisoning.
  2. JFrog (2024). Data Scientists Targeted by Malicious Hugging Face ML Models with Silent Backdoor. 27 February 2024.
  3. Hugging Face (2026). Pickle Scanning and Safetensors. Read 20 November 2026.
  4. USENIX (2025). Spracklen et al., We Have a Package for You! A Comprehensive Analysis of Package Hallucinations by Code Generating LLMs. USENIX Security 2025.
  5. Invariant (2025). MCP Security Notification: Tool Poisoning Attacks. 1 April 2025.

NEW CODE EVERY MONTH.

Get a note when new Claude Code templates, code recipes or tools go live.

No account required

We email once to confirm. Unsubscribe anytime — it deletes your address.

New drops, every week

Free tools & Claude templates, landing regularly.

We keep shipping new free tools, code recipes and Claude Code templates. Follow @freeyantra on Instagram or join the newsletter so you never miss one.

Follow @freeyantra

or get them by email

Double opt-in. Unsubscribe any time. Privacy