Most threat models of AI systems stop at the web application around the model and never ask how the training data, the weights, the prompt context or an agent's tools can be turned against the business. This guide shows how to threat model machine learning and large language model systems by combining two tools: STRIDE, which most security architects already use, and the OWASP AI Exchange threat structure, which names the threats specific to AI. It covers scoping, a STRIDE by component table, the AI Exchange decision tree for picking relevant threats, MITRE ATLAS mapping, and how to turn the result into risk register entries with owners. It is written for security architects, ML engineers and the risk leads who sign off AI releases. The general method is in the Threat Modelling Guide, which this page does not repeat.
Key takeaways
- Keep the four questions, change the boundaries. The Threat Modeling Manifesto questions still apply, but training data, its suppliers, pre-trained models and prompt context all sit inside the trust boundary you model.
- STRIDE finds the conventional threats, the AI Exchange finds the AI ones. Use STRIDE across every component, then walk the AI Exchange decision tree so that poisoning, prompt injection, model leaks and resource exhaustion are not missed.
- Start big, end small. The AI Exchange approach is to consider every threat in theory, then drop those that do not apply to your use case, leaving a short list to treat.
- Agency multiplies impact. A model that can trigger actions, reach sensitive data and send data out turns a prompt injection into a data exfiltration path, so rate agent components higher.
- The output is a register, not a diagram. Each accepted threat becomes a risk entry with an ATLAS ID, a control, an owner, a test and a review date.
Why AI systems need adapted threat models
The method does not change. The Threat Modeling Manifesto frames every threat model around four questions: what are we working on, what can go wrong, what are we going to do about it, and did we do a good enough job. What changes is the answer to the first two questions.
- Data becomes code: in a conventional system, data is processed by logic. In an ML system, training data shapes the logic itself, so whoever can influence the data can influence behaviour. Microsoft's guidance on threat modelling AI/ML systems tells teams to treat training data and its providers as in scope, assume data can be poisoned, and plan for recovery.
- Instructions and data share a channel: an LLM cannot reliably tell a user's instruction from text inside a retrieved document, which is why indirect prompt injection exists (OWASP LLM01:2025 Prompt Injection, ATLAS AML.T0051.001).
- The model is an asset and an interface: weights can be stolen, and the inference API itself can be used to extract training data or a copy of the model (ATLAS AML.T0024 Exfiltration via AI Inference API).
- The supply chain is wider: pre-trained models, datasets, MLaaS providers and model hubs all add dependencies. Microsoft's guidance asks teams to map every AI/ML dependency and presentation layer.
- Harm is not only a breach: wrong but silent outputs, physical-world effects and privacy harm all count. Microsoft's review questions include "if outputs are wrong but no errors are reported, how would you know?"
The OWASP AI Exchange (owaspai.org) is the most complete open threat catalogue for this work. It groups AI threats into three types: input threats (attacks made by crafting input to the model), development-time threats (attacks on the development environment and supply chain) and runtime conventional security threats (attacks on the running system other than through input). Its contributors also supplied text to ISO/IEC 27090 and to the European standard being prepared for AI Act cybersecurity.
Scoping the AI system
Draw the data flow diagram first, then mark AI-specific assets and boundaries on it. A scope that leaves out the training pipeline or the retrieval store will produce a clean model of the wrong system.
| Component | What to include | Typical trust boundary |
|---|---|---|
| Data | Sources, labelling, feature stores, data suppliers, consent and lineage records | External data provider to your ingestion pipeline |
| Training and fine-tuning | Pipelines, notebooks, compute, experiment tracking, base models pulled from hubs | Model hub or supplier to your build environment |
| Model | Weights, model registry, signing, configuration and system prompts | Registry to serving infrastructure |
| Inference | Serving API, gateway, input and output filters, retrieval store (RAG), logs | User or calling system to the inference API |
| Agents | Tools, plugins, MCP servers, credentials the agent uses, memory, downstream actions | Model output to the systems the agent can change |
For each component, record who operates it (you, a supplier or shared), the data classification, and the identities that touch it. The AI Exchange is explicit that where components are hosted by someone else responsibility is shared and should be agreed, for example with a responsibility matrix, then verified. Retrieval designs have their own model in Threat Modelling RAG Systems, and agent designs in the AI Agent Threat Modelling Guide.
Scoping questions worth asking early: who can contribute to training datasets; can you trace a data problem back to where it entered; can you roll back to a prior model version; which partners are authenticated to the model API and can you revoke them quickly; and is the model hosted by you or a supplier. These come from Microsoft's AI/ML review questions and they decide which threats apply.
Applying STRIDE to AI components
STRIDE stands for Spoofing, Tampering, Repudiation, Information disclosure, Denial of service and Elevation of privilege. Microsoft's Threat Modeling Tool defines each one; the AI meaning of each category is shown below. Walk every component row and ask each STRIDE question; the cells give the threats that most often come up.
| Component | Spoofing | Tampering | Repudiation | Information disclosure | Denial of service | Elevation of privilege |
|---|---|---|---|---|---|---|
| Data | Fake data supplier or forged labeller account | Data poisoning of train or fine-tune data | No lineage, so a poisoned record cannot be traced | Leak of training data at rest or in the pipeline | Corrupted or deleted datasets block retraining | Write access to datasets used as a route to change model behaviour |
| Training | Typosquatted or impersonated base model on a hub | Development-time model poisoning, backdoors, malicious serialised models | Untracked experiments, no record of who changed a run | Development-time model leak from notebooks or buckets | Compute exhaustion or sabotage of training jobs | Pipeline service account with broad cloud rights |
| Model | Unsigned model swapped in the registry | Runtime model poisoning, altered system prompt | No version pinning, so outputs cannot be tied to a model | Model exfiltration, system prompt leakage | Registry outage or deleted versions | Registry write rights used to promote an untested model |
| Inference | Stolen API keys used to call the model | Direct and indirect prompt injection, evasion, RAG data manipulation | Prompts and outputs not logged | Disclosure in output, model inversion, membership inference, model extraction through queries | AI resource exhaustion and cost harvesting | Injected instructions bypass guardrails or role limits |
| Agents | Agent acting with a human's identity, or a rogue tool server | Output contains conventional injection (SQL, script, command) passed to tools | Agent actions not attributable to a principal | Agent sends retrieved data to an external destination | Runaway tool loops | Excessive agency: tools or credentials broader than the task (OWASP LLM06:2025) |
Where identity fits: several cells are identity problems. Pipeline service accounts, API keys for the inference endpoint and the credentials an agent holds are non-human identities, and a broad one turns a tampering threat into elevation of privilege. Give each its own identity, scope it to one component, and rotate it. See the AI Agent Threat Model Template for agent credential entries.
Using OWASP AI Exchange threats
STRIDE is generic, so it can miss AI-specific threats or lump them together. The AI Exchange decision tree closes that gap. Ask each question; a yes adds the named threats to your list.
| Decision question | If yes, consider (AI Exchange names) | ATLAS technique |
|---|---|---|
| Is the model generative and can attackers supply input whose output could cause harm? | Direct prompt injection | AML.T0051.000 Direct |
| Do you insert untrusted data (documents, web pages, emails) into prompts? | Indirect prompt injection | AML.T0051.001 Indirect |
| Does a supplier train or fine-tune the model? | Supply-chain model poisoning | AML.T0010 Supply Chain Compromise |
| Do you train or fine-tune it yourself? | Data poisoning of train/finetune data; direct development-time model poisoning | AML.T0020 Training Data Poisoning; AML.T0018 Manipulate AI Model |
| Do you augment input (RAG, agent memory, system prompts)? | Augmentation data manipulation; direct augmentation data leak | AML.T0070 RAG Poisoning |
| Do you run the model yourself? | Direct runtime model poisoning | AML.T0018 Manipulate AI Model |
| Is it a classification task such as spam or fraud scoring? | Evasion | AML.T0015 Evade AI Model |
| Do you train on sensitive data? | Disclosure in output; model inversion / membership inference; development-time data leak | AML.T0024.000 Infer Training Data Membership; AML.T0057 LLM Data Leakage |
| Is the model itself valuable intellectual property? | Model exfiltration; direct runtime and development-time model leak | AML.T0024.002 Extract AI Model |
| Is input data sensitive, especially with a supplier-run model? | Input data leak | Map to your conventional data leakage threats |
| Does the model produce text that other systems consume? | Output contains conventional injection | Map to the receiving system's injection threats |
| Always | AI resource exhaustion | AML.T0029 Denial of AI Service; AML.T0034 Cost Harvesting |
The decision tree also asks whether the model can trigger actions. The AI Exchange calls the combination of manipulable behaviour, a way to send data outward and access to sensitive data the "lethal trifecta": if all three are present, any injection threat becomes a data exfiltration threat. Agent tool calls map to ATLAS AML.T0053 AI Agent Tool Invocation. Break one leg of the trifecta wherever you can.
Two more threat groups always stay on the list: generic runtime security threats and generic development-environment and supply-chain threats. These are where STRIDE does most of the work, and Microsoft's guidance is blunt that attacks often succeed through the lower software layers rather than the model.
The OWASP Top 10 for LLM Applications 2025 is a useful cross-check for LLM systems: Prompt Injection (LLM01), Sensitive Information Disclosure (LLM02), Supply Chain (LLM03), Data and Model Poisoning (LLM04), Improper Output Handling (LLM05), Excessive Agency (LLM06), System Prompt Leakage (LLM07), Vector and Embedding Weaknesses (LLM08), Misinformation (LLM09) and Unbounded Consumption (LLM10). If a Top 10 entry has no matching row in your model, check whether you missed a component.
Prioritising and mitigating
The AI Exchange risk process runs from identifying risks through evaluating likelihood and impact, treatment, arranging responsibility, verifying external parties, selecting controls and residual risk acceptance, to continuous assessment. In practice that becomes the following steps.
- Rate likelihood: consider attacker opportunity and motive, the number of people who can reach the input, attacker capability, the system's susceptibility and past incidents. A public chatbot that reads web pages has a far higher prompt injection likelihood than an internal classifier.
- Rate impact: include direct effects (wrong decisions, leaked data, downtime) and indirect ones (regulatory and reputational harm). Agency, scale and the criticality of the task raise impact.
- Choose a treatment: mitigate, transfer (for example to a supplier under contract), avoid (do not use AI for that function) or accept. Record the rationale; the AI Exchange stresses documenting the risk assessment, control selection and evidence, which the EU AI Act also expects for high-risk systems.
- Select controls: the AI Exchange groups controls under Manage, Have resilient models, Watch and Limit. Typical choices are supply chain management and model signature checks (ATLAS AML.M0014 Verify AI Artifacts, AML.M0013 Code Signing), training data sanitisation (AML.M0007 Sanitize Training Data), adversarial input detection for predictive models (AML.M0015), rate limiting, minimal output, least privilege for agent tools and human approval for high-impact actions.
- Assign and verify responsibility: where a supplier hosts the model, agree who owns each control and check it, for example through audit reports. If a supplier will not disclose its mitigations, add your own, accept the risk or change supplier.
- Test before release: each mitigation needs a test, such as a red team prompt set for injection, a canary record for training data leakage, or a rate limit test for resource exhaustion.
From threat to risk register
| Register field | Example entry |
|---|---|
| Risk ID and title | AI-07 Indirect prompt injection via supplier invoices in the claims assistant |
| Component and STRIDE | Inference and Agents; Tampering, Elevation of privilege |
| Framework references | AI Exchange: indirect prompt injection; ATLAS AML.T0051.001; OWASP LLM01:2025 |
| Likelihood and impact | High likelihood (external documents), high impact (agent can approve payments) |
| Treatment and controls | Mitigate: remove payment tool, human approval above threshold, content isolation, output monitoring |
| Owner and test | Product owner; quarterly injection test set with pass criteria |
| Residual risk and review | Medium, accepted by risk lead; review at next model or tool change |
Feed the register into your wider AI risk process. The AI Risk Assessment Guide covers how AI risks roll up, and ISO/IEC 23894 AI Risk Management Guide covers the standard many organisations align to.
Detection and measurement
- Log for repudiation: prompts, retrieved context references, model version, tool calls and the principal behind each call. Without them most threats in the Repudiation column stay open.
- Watch for poisoning and drift: sudden confidence drops or skew in training data quality, which Microsoft's questions ask you to be able to explain.
- Watch for extraction: high query volumes from one key, systematic input sweeps, and spend spikes.
Metrics that show the practice works: share of production AI systems with a threat model reviewed in the last 12 months; share of register entries with an owner and a passing test; number of agent tools removed or narrowed after review; time from a model or tool change to threat model update; and injection test pass rate per release.
Common failure patterns
- Modelling only the chat interface: the training pipeline, model registry and retrieval store never appear on the diagram, so poisoning and model leaks are absent from the register.
- Treating the supplier as out of scope: a hosted model removes runtime poisoning from your list but not input data leak, prompt injection or resource exhaustion.
- One model per programme, not per system: a shared template is filled once and never updated when a tool, data source or model version changes.
- Agent rights decided after the model: tools and credentials are added later without re-running the Elevation of privilege column. See the Agentic AI Risk Assessment Template.
- Guardrails as the only control: filters are rated as full mitigation for prompt injection, when least privilege and human approval are what limit the damage.
Practitioner checklist
- Draw the data flow with all five components: data, training, model, inference and agents.
- Record who operates each component and agree a responsibility matrix with each supplier.
- Run STRIDE across every component and record at least one answer per cell, even if it is "not applicable, because".
- Walk the OWASP AI Exchange decision tree and add every threat that applies.
- Check for the lethal trifecta in any agent and remove one leg where you can.
- Map each threat to an ATLAS ID and, for LLM systems, an OWASP LLM Top 10 2025 entry.
- Write each accepted threat as a register entry with likelihood, impact, treatment, owner, test and review date.
- Log prompts, model versions and tool calls so repudiation threats are closed.
- Re-run the model whenever the model version, data source, tool set or supplier changes.
Standards and references
- OWASP AI Exchange: AI Security Overview
- MITRE: ATLAS (Adversarial Threat Landscape for Artificial-Intelligence Systems)
- OWASP GenAI Security Project: Top 10 for LLM Applications 2025
- NIST: AI 100-2 E2025 Adversarial Machine Learning: A Taxonomy and Terminology of Attacks and Mitigations
- Microsoft Learn: Threat Modeling AI/ML Systems and Dependencies
- Microsoft Learn: Microsoft Threat Modeling Tool threats (STRIDE)
- Threat Modeling Manifesto
Related NHI Mgmt Group resources: Threat Modelling Guide · AI Model Threat Model Template · Threat Modelling RAG Systems · AI Data Poisoning and Backdoors Guide