AI supply chain security
AI supply chain security is protecting an AI system against tampered or untrustworthy parts it depends on, such as pre-trained models, datasets, adapters and software libraries obtained from others.
Very few organisations build an AI system from scratch. They download a pre-trained model, fine-tune it on a public dataset, add an adapter someone else trained and run it all on open-source libraries. Every one of those parts is a link in a supply chain, and each can be poisoned, swapped or sabotaged before it arrives. AI supply chain security is the discipline of checking where those parts come from and whether they are what they claim to be.
Some of the risks are familiar from ordinary software. Between 25 and December 30, 2022, anyone who installed the nightly build of PyTorch on Linux through pip also received a malicious package called torchtriton, uploaded to the public Python Package Index under the same name as a PyTorch dependency. Because pip preferred the public index, the impostor was installed instead, and it sent system information, SSH keys and other files to an attacker. Users of stable releases were not affected.
Other risks are specific to AI. Many model files are saved in Python's pickle format, which can run arbitrary code when loaded. Hugging Face's documentation warns about this, scans uploaded files for suspicious imports and promotes safetensors, a format that stores only the numbers. Beyond code, the model itself can be the weapon: OWASP's 2025 list of risks for language model applications describes models edited to spread misinformation, malicious copies uploaded under the name of a withdrawn model, poisoned public datasets that plant backdoors, and LoRA adapters that compromise a base model when merged.
Guidance from security agencies treats this as a core part of secure development. The UK NCSC's Guidelines for secure AI system development, published on November 27, 2023, lists supply chain security under the development stage. OWASP recommends buying only from vetted suppliers, keeping a signed inventory of components such as an AI bill of materials, checking file hashes and signatures, and testing third-party models on your own tasks, since a model can be tuned to look good on public benchmarks.
For most businesses the practical steps are unglamorous: download models only from trusted publishers, prefer safe file formats, pin and verify versions, keep a record of every model and dataset in use, and treat a model from an unknown source with the same suspicion as an unknown executable.
It is an attack that compromises something an AI system depends on before it reaches the user, such as a model file, a dataset, an adapter or a software library. The victim then installs the tampered part themselves. Examples include malicious packages on public code indexes and model files that run hidden code when loaded. Yes, depending on the file format. Models saved with Python's pickle format can execute arbitrary code when loaded, which Hugging Face's own documentation warns about. Formats such as safetensors store only the model's numbers and avoid that risk, and downloading from trusted publishers reduces it further. Use vetted sources, verify signatures and file hashes, keep an inventory of every model, dataset and library in use, and keep components updated. Test third-party models on your own tasks before relying on them, and monitor for unexpected behaviour after deployment. OWASP and national cyber agencies publish checklists covering these steps.Common questions
What is an AI supply chain attack?
Can downloading an AI model infect my computer?
How do you secure an AI supply chain?
Search for "AI supply chain security", "malicious models Hugging Face", "pickle deserialisation" or "OWASP LLM03 supply chain" to follow the risks. Guidance from national cyber agencies such as CISA and the NCSC, OWASP's projects and incident write-ups from the affected projects are the most reliable sources. Security vendors publish many useful findings, but their counts of malicious models depend on how each defines malicious.Finding more
Working out what this means for your business?
Aileron Shift builds the systems behind this site: AI newsrooms that research, write and publish on their own, marketing automation and WordPress hosting for companies that need to move faster than their competitors.