An LLM application inherits the weaknesses of every model, adapter, dataset, library, conversion service and hosting platform it is built from, and most teams cannot list those components, let alone verify them. LLM03:2025 Supply Chain is the OWASP Top 10 for LLM Applications entry for that problem. This guide turns its nine risk examples and ten mitigations into an assessable requirement set, with the evidence an assessor should ask for, the identities that protect each link in the chain, and a phased rollout. Model file formats and safe loading are covered in depth in the Model Supply Chain Guide and AI-BOM content in the AI Supply Chain and AI-BOM Guide; this page links to them rather than repeating them. It is written for AppSec, ML platform and third-party risk teams.
Key takeaways
- LLM03 is wider than software dependencies. OWASP adds pre-trained models, LoRA adapters, datasets, collaborative merge and conversion services, on-device models and supplier terms of service to the usual package risks.
- Model provenance is weak by default. OWASP states there are currently "no strong provenance assurances in published models"; hashes, signatures and pinning have to compensate.
- Benchmarks are not assurance. PoisonGPT's edited model scored within 0.1% of the original on a toxicity benchmark, which is why OWASP asks for red teaming in your own use case.
- Build and publishing identities are the soft spot. Bot tokens, CI publishing tokens and hub write tokens were the route in for the Safetensors conversion research and the LiteLLM PyPI compromise.
- Terms of service are a supply chain risk. OWASP lists unclear T&Cs and privacy policies, including a supplier switching to opt-out training on your data, alongside technical tampering.
What it is and who it applies to
The official entry is LLM03:2025 Supply Chain on genai.owasp.org (page last modified May 2025). The plan title of this page matches the official risk name. OWASP says LLM supply chains "are susceptible to various vulnerabilities, which can affect the integrity of training data, models, and deployment platforms", and that in machine learning the risk "also extend[s] to third-party pre-trained models and data". Poisoning overlaps with LLM04 Data and Model Poisoning; OWASP says LLM03 focuses on the supply chain aspect. Plugins and tools, named in this page's title, sit in this entry as externally supplied code; their run-time permissions belong to LLM06. See the OWASP LLM Top 10 LLM06 Excessive Agency Guide.
Who it applies to: anyone who fine-tunes or self-hosts open-weight models, loads models, adapters or datasets from a public hub, consumes a hosted model API, ships a model on device, or builds LLM features on open-source frameworks. Organisations that only consume a hosted API still own risk examples 3 (outdated or deprecated models) and 9 (terms and privacy), plus the package risks in their own application code.
Structure and key requirements
The entry has nine common examples of risk, ten prevention and mitigation strategies and thirteen sample attack scenarios, and maps to MITRE ATLAS AML.T0010 ML Supply Chain Compromise (named AI Supply Chain Compromise in current ATLAS data). The table pairs each risk with the OWASP strategy that addresses it and the evidence to request.
| OWASP risk example | Matching OWASP strategy | What to implement | Evidence to request |
|---|---|---|---|
| 1. Traditional third-party package vulnerabilities | 2 (apply A06:2021 controls), 9 (patching policy) | Dependency scanning for training, fine-tuning and serving environments as well as the app; lockfiles with hashes; internal package mirror | SCA reports per environment; patch SLAs met |
| 2. Licensing risks | 5 (licence inventory in BOMs) | Licence fields for every model and dataset; legal review of use, distribution and commercial terms | BOM with licence per component; audit log |
| 3. Outdated or deprecated models | 9 (maintained APIs and models) | Track supplier deprecation dates; retire unmaintained models | Model register with support status and end dates |
| 4. Vulnerable pre-trained model | 3 (red teaming and evaluations), 8 (anomaly and robustness tests) | Use-case specific red teaming before adoption; safe file formats | Evaluation report tied to the exact model digest |
| 5. Weak model provenance | 6 (verifiable sources, signing, hashes) | Pin to commit and digest; verify signatures where published; internal registry | Recorded digests; signature verification logs |
| 6. Vulnerable LoRA adapters | 6 and 7 | Treat adapters as models: same intake, signing and approval; no runtime adapter loading from untrusted paths | Adapter inventory; serving configuration |
| 7. Exploited collaborative development processes | 7 (monitor merge and conversion environments) | Review merge and conversion pull requests; restrict bot write access | Pull request review records; bot token scopes |
| 8. On-device model supply chain | 10 (encrypt edge models, integrity checks, attestation) | Encrypted model files, integrity check at load, platform attestation APIs | Build configuration; attestation failure telemetry |
| 9. Unclear T&Cs and data privacy policies | 1 (vet suppliers, review T&Cs) | Contractual training opt-out, retention terms, change notification | Signed terms; periodic review record |
Risks the entry adds beyond classic software supply chain
- LoRA adapters at serving time: OWASP names vLLM and OpenLLM support for downloading and applying adapters to a deployed model. vLLM's own documentation says runtime adapter loading (enabled with
VLLM_ALLOW_RUNTIME_LORA_UPDATINGand the/v1/load_lora_adapterendpoint) "comes with security risks" and should not be used in production unless the environment is isolated and fully trusted, and that its Hugging Face Hub resolver plugin is "insecure and not intended for use in production". Load adapters at start-up with--lora-modulesfrom an approved path instead. - Conversion and merge services: HiddenLayer showed that Hugging Face's Safetensors conversion Space loaded submitted PyTorch files with
torch.load(), so a crafted model could run code in the service container, where the SFconvertbot token was available as an environment variable. That token could open pull requests on any repository under the bot's trusted name, and HiddenLayer found organisations hosting 905 models had accepted pull requests from the bot. - Edited and look-alike models: Mithril Security's PoisonGPT edited GPT-J-6B with ROME to change one factual association, uploaded it under a look-alike organisation name missing one letter, and measured only a 0.1% accuracy difference on the ToxiGen benchmark.
- Hardware and hosting layer: LeftoverLocals (CVE-2023-4969), cited by OWASP, let one process recover data left in GPU local memory by another; Trail of Bits measured about 181 MB per LLM query on an AMD Radeon RX 7900 XT running a 7B model with llama.cpp, enough to reconstruct the response. NVIDIA and Arm said they were not affected. The practical control is avoiding untrusted multi-tenant GPU sharing for sensitive inference. See the Confidential AI and GPU Enclaves Guide.
- AI framework infrastructure: the ShadowRay scenario concerns CVE-2023-48022, which NVD describes as remote code execution via the Ray job submission API and marks as disputed, with the vendor stating Ray is not intended for use outside a strictly controlled network and offering token authentication from version 2.52.0. Treat AI orchestration dashboards and job APIs as privileged management planes, never internet facing.
Identity and NHI requirements
Every link in an LLM supply chain is guarded by a non-human identity: hub tokens that publish models, CI tokens that publish packages, bot tokens used by conversion services, registry credentials for internal mirrors and API keys for hosted models. Compromise of one of these is how tampered components reach consumers.
| Identity | What it can do if stolen | Control |
|---|---|---|
| Package publishing token in CI | Publish a malicious release outside the normal workflow | Trusted publishing with short-lived OIDC credentials; secrets scoped to the release job only |
| Model hub write token | Replace weights or adapters in a trusted repository | Fine-grained, repository-scoped tokens; separate read and write tokens; SSO for org members |
| Service bot token (conversion, merge) | Open trusted-looking pull requests on many repositories | Consumers review bot pull requests like any other; services keep tokens out of code-execution environments |
| Internal registry or mirror credential | Poison the approved copy every team trusts | Write access limited to the intake pipeline identity; signed artefacts |
| Hosted model API key | Run workloads at your cost or reach data you send | Vault storage, per-application keys, spend limits; see the LLMjacking Guide |
- CI secrets reach every tool in the job: in the LiteLLM PyPI package breach a tampered security scanner in the CI pipeline read the
PYPI_PUBLISHtoken, and the attackers used it to upload two malicious LiteLLM versions that harvested cloud credentials and LLM API keys from installing hosts. - Platform secrets are part of the chain: the Hugging Face Spaces breach exposed a subset of stored Spaces secrets; Hugging Face revoked affected tokens and made fine-grained tokens the default. See the Hugging Face Security Guide.
- Development hosts hold the keys: the PyTorch nightly
torchtritoncompromise (25 to 30 December 2022) installed a binary that collected environment variables,$HOME/.ssh/*and.gitconfigfrom Linux hosts that installed the nightly via pip, because pip preferred a same-named PyPI package over PyTorch's own index. Fine-tuning workstations need the same dependency controls as production. See the OWASP NHI Top 10 NHI3 Vulnerable Third-Party NHI Guide.
Implementation steps
- Inventory components: list every model, adapter, dataset, embedding model, framework, serving engine and hosted API each LLM feature uses, with source, version or commit, digest, licence and owner. Use CycloneDX, whose ML-BOM capability covers models, datasets and configurations, as OWASP suggests.
- Set intake policy: approved sources only; non-executable weight formats preferred; models pinned to a commit and digest; adapters subject to the same rules as base models. See the Model Supply Chain Guide.
- Stand up an internal registry: mirror approved models, adapters and packages; let only the intake pipeline identity write to it; point all training and serving environments at the mirror.
- Verify integrity: record SHA-256 digests at intake and verify at load. Where publishers sign, verify signatures; the OpenSSF Model Signing specification signs a manifest of every file's hash in a detached Sigstore bundle, and supports bare keys, private PKI and Sigstore. Sign your own models the same way.
- Evaluate before adoption: red team each candidate model in the intended use case (OWASP strategy 3) and keep the report tied to the digest; repeat after any update. See the AI Red Teaming Guide.
- Harden serving: disable runtime adapter loading and remote model downloads in production; load from the registry at start-up; keep orchestration APIs on private networks with authentication.
- Lock down publishing identities: move to trusted publishing, scope CI secrets to the job that needs them, pin CI tools by digest, and use fine-grained hub tokens.
- Review suppliers and terms: record training opt-out, retention and change-notification terms for each hosted model; re-review on every terms change.
- Roll out in audit mode: run the intake checks as warnings for one or two release cycles, fix the backlog of unpinned and unsigned components, then enforce for a pilot team before blocking organisation-wide. Keep the previous approved digest so a rejected update can be rolled back immediately.
Decision guidance
| Situation | Priority controls | Trade-off |
|---|---|---|
| Hosted API only, no self-hosting | Supplier and T&C review, deprecation tracking, API key controls, app dependency scanning | Less control over the model; contractual assurance replaces technical checks |
| Self-hosted open-weight models | Internal registry, digest pinning, safe formats, red teaming, serving hardening | Engineering effort; slower adoption of new releases |
| Fine-tuning with third-party datasets or adapters | Dataset provenance and licence review, adapter intake, poisoning tests (with LLM04) | Evaluation cost per dataset and adapter |
| On-device models | Encrypted model files, integrity checks at load, platform attestation | Device compatibility; key management for model encryption |
| Small team | Pin, hash and mirror a short list of approved models; fine-grained tokens | Fewer models to choose from |
| Large organisation | Central intake pipeline, ML-BOM per release, supplier risk tiers | Platform team needed to run it |
Evidence and assessment
- Inventory evidence: a current BOM per LLM feature listing models, adapters, datasets, packages and hosted services with digests and licences.
- Integrity evidence: intake logs showing digest and signature checks, and load-time verification in serving.
- Assurance evidence: red-team and evaluation reports per model digest; dependency scan results for training, fine-tuning and serving environments.
- Identity evidence: list of publishing, hub, registry and API identities with scopes, owners and last rotation; proof of trusted publishing.
- Supplier evidence: reviewed T&Cs and privacy terms with dates, and deprecation dates for each hosted model.
What to monitor: loads of models or adapters not in the registry, digest mismatches at load, new outbound downloads from model hubs in production, changes to pinned commits, publishing events outside the release workflow, and supplier terms or deprecation notices.
| Metric | Target |
|---|---|
| LLM components in the BOM with source, digest, licence and owner | 100 percent |
| Production model and adapter loads from outside the internal registry | Zero |
| Models in production with a red-team report for the deployed digest | 100 percent |
| Critical vulnerabilities in AI frameworks past patch SLA | Zero |
| Long-lived publishing tokens remaining in CI | Zero |
| Hosted models within 90 days of deprecation without a migration plan | Zero |
Mapping to other frameworks
| Framework | Reference | Relevance to LLM03 |
|---|---|---|
| MITRE ATLAS | AML.T0010 AI Supply Chain Compromise (.001 AI Software, .002 Data, .003 Model, .004 Container Registry); AML.T0058 Publish Poisoned Models | OWASP's mapping and its sub-techniques |
| MITRE ATLAS mitigations | AML.M0023 AI Bill of Materials; AML.M0014 Verify AI Artifacts; AML.M0013 Code Signing; AML.M0016 Vulnerability Scanning; AML.M0011 Restrict Library Loading | Strategies 4, 6 and 2 |
| MITRE ATT&CK | T1195.001 Compromise Software Dependencies and Development Tools; T1195.002 Compromise Software Supply Chain | Package and framework compromise |
| NIST SP 800-53 Rev. 5 | SR-3; SR-4 Provenance; SR-5; SR-6 Supplier Assessments and Reviews; SR-11 Component Authenticity | Supplier vetting, provenance and authenticity |
| NIST SP 800-53 Rev. 5 | CM-8 System Component Inventory; SI-7 Software, Firmware, and Information Integrity; RA-5; SA-9 External System Services | BOM, integrity checks, scanning, hosted model services |
| NIST CSF 2.0 | GV.SC-07; ID.RA-01; PR.PS-01 | Supplier risk through the relationship, vulnerability identification, configuration management |
| ISO/IEC 27001:2022 Annex A | A.5.19 to A.5.22 supplier relationships; A.5.32 Intellectual property rights | Supplier security and licensing |
| OWASP Top 10 2021 | A06:2021 Vulnerable and Outdated Components | Referenced directly by LLM03 strategy 2 |
See the NIST SP 800-161 Cyber Supply Chain Risk Management Guide and the SLSA and Build Provenance Guide for the general supply chain programme.
Common pitfalls
- Trusting the name: loading a model by organisation and repository name without a pinned commit; look-alike names, as in PoisonGPT and OWASP's WizardLM scenario, and later changes both slip through.
- Trusting the benchmark: accepting a leaderboard score as evidence of safety, when OWASP notes models can be fine-tuned to pass published benchmarks.
- Scanning the app but not the training box: fine-tuning and notebook environments hold data and credentials but are often outside dependency controls, as the torchtriton nightly compromise showed.
- Runtime adapter loading in production: enabling convenient dynamic LoRA loading that vLLM's own documentation says is for isolated, fully trusted environments only.
- Merging bot pull requests unread: treating conversion or merge bot changes as trusted because of the bot's identity.
- Stale publishing rights and tokens: long-lived tokens in CI can be read by any tool in the job, and dormant accounts keep their rights; in the Mastra npm supply chain attack a former contributor's account that still had publish rights was used to backdoor more than 140 AI framework packages, after which Mastra disabled token-based publishing.
Practitioner checklist
- Maintain a CycloneDX BOM per LLM feature covering models, adapters, datasets, packages and hosted services.
- Pin every model and adapter to a commit and SHA-256 digest and verify at load.
- Serve only from an internal registry that only the intake pipeline can write to.
- Prefer non-executable weight formats and verify publisher signatures where offered; sign your own models.
- Red team each model in its intended use case and tie the report to the deployed digest.
- Disable runtime adapter loading and remote hub downloads in production serving.
- Scan dependencies in training, fine-tuning and serving environments, not only the application.
- Replace long-lived publishing tokens with trusted publishing and scope CI secrets per job.
- Record licence, training opt-out, retention and deprecation terms for every model supplier and review on change.
- Keep AI orchestration and job APIs on private networks with authentication.
Standards and references
- OWASP: LLM03:2025 Supply Chain
- OWASP: Top 10 for LLM Applications 2025
- MITRE ATLAS: AI Supply Chain Compromise
- NIST: SP 800-53 Rev. 5
- OpenSSF: Model Signing Specification
- CycloneDX: Machine Learning Bill of Materials (ML-BOM)
- vLLM: LoRA Adapters
- HiddenLayer: Silent Sabotage, Hijacking Safetensors Conversion on Hugging Face
Related NHI Mgmt Group resources: OWASP Top 10 for LLM Applications Guide · Model Supply Chain Guide · AI Supply Chain and AI-BOM Guide · Self-Hosted LLM Security Guide · Software Supply Chain Security Guide