Friday, November 13, 2026
Explainer

Securing the AI pipeline: data poisoning, model supply chain and prompt injection

An AI system can be attacked through its training data, the models it downloads and the text it reads. Each stage of the pipeline needs its own controls.

A laptop screen showing colourful code

Software teams spent the last decade securing their build pipelines. AI adds a second pipeline alongside it: data is collected, models are trained or downloaded, then deployed and fed user input. Each step can be attacked.

NIST's reference on the subject, AI 100-2 E2025, published in March 2025, sets out a taxonomy of attacks on machine learning systems, covering evasion, data poisoning, privacy attacks and abuse of generative AI systems such as chatbots.

The attacks, stage by stage

Stage Attack What happens
Training data Data poisoning Attacker plants data that skews the model or adds a hidden trigger
Model sourcing Tampered or malicious models A downloaded model contains a backdoor or code that runs when loaded
Deployment Evasion Inputs crafted to make the model misclassify, such as fooling a fraud model
Use Prompt injection Instructions hidden in a document, email or web page hijack an AI assistant
Use Privacy attacks Queries designed to extract training data or confidential context

The model supply chain

Most companies don't train models from scratch. They download open models and libraries, and fine-tune them. That makes AI part of the software supply chain, which OWASP now ranks third in its 2025 Top 10 for web application risk as Software Supply Chain Failures.

Some model file formats can execute code when loaded. Prefer formats that store only weights, such as safetensors, pull models from known publishers, record the exact version and checksum, and scan model files as you would any third-party package.

Prompt injection

For companies using large language models, prompt injection is the most practical risk today. An AI assistant that reads email, documents or web pages can be told, by text in that content, to ignore its instructions, leak data or take actions. There is no complete technical fix yet. The controls that work limit what the assistant can do: least-privilege access to data and tools, human approval for actions such as sending email or moving money, and keeping untrusted content separate from instructions.

Bringing it into existing processes

Treat datasets and models as build artifacts: version them, control who can change them, and log where they came from. Add AI-specific tests, such as checks for known injection patterns, to the same CI/CD pipeline that tests your code. See our CI/CD guide for the pipeline basics.

What IT teams should do

  • Keep an inventory of every model in use, with source, version and checksum.
  • Load third-party models only in weights-only formats such as safetensors.
  • Give AI assistants the least access they need, and require approval for actions.
  • Restrict who can add or change training and fine-tuning data, and log every change.

Sources