AI threat modeling is the structured process of identifying how an AI or machine learning system could be attacked or misused, which assets are at risk and which controls reduce that risk, before the system reaches production. In AI security, it extends classic software threat modeling to assets that conventional methods overlook: training data, model weights, prompts, embeddings and autonomous tool access.
The practice keeps the familiar cycle of describing the system, finding threats, choosing responses and validating the result. What changes for AI is the threat discovery step, because model behavior itself becomes an attack surface that can be manipulated through data and natural language.
How AI threat modeling extends classic methods
AI threat modeling starts from the same foundation as conventional work: a data flow diagram with trust boundaries, followed by a systematic search for threats at each boundary. The difference is that AI systems contain probabilistic components that follow instructions hidden in data, learn from untrusted sources and produce output that other systems may execute.
Teams therefore add AI-specific elements to the diagram: data collection and labeling pipelines, training jobs, the model registry, inference endpoints, retrieval stores and every tool an agent can call. Each element receives its own trust level, and every path from untrusted content to a privileged action is treated as a candidate threat.
The table below maps the six STRIDE categories to their typical AI counterparts.
| STRIDE category | Classic example | AI-specific counterpart |
|---|---|---|
| Spoofing | Stolen credentials | Forged instructions in retrieved documents |
| Tampering | Modified files | Data poisoning or a backdoored model artifact |
| Repudiation | Missing audit logs | Untraceable agent actions without prompt logs |
| Information disclosure | Database leak | Training data extraction or prompt-based exfiltration |
| Denial of service | Network flooding | Sponge inputs that maximize compute per request |
| Elevation of privilege | Exploited vulnerability | Prompt injection that triggers privileged tools |
Assets and threat categories specific to AI
The asset inventory in AI threat modeling is broader than in ordinary applications. Besides user data and infrastructure, it covers the training corpus, labels, model weights, system prompts, vector embeddings and the permissions granted to agents. Each asset maps to distinct attack classes described in references such as MITRE ATLAS and NIST AI 100-2.
| Asset | Main threat | Typical control |
|---|---|---|
| Training data | Poisoning and backdoors | Provenance checks, data validation, anomaly filtering |
| Model weights | Theft or serialization attacks | Model signing, safe formats, access control |
| Inference API | Evasion, extraction, abuse | Rate limits, monitoring, output filtering |
| System prompt and context | Direct and indirect prompt injection | Instruction hierarchy, spotlighting, isolation |
| Retrieval store | RAG poisoning | Source allowlists, ingestion review |
| Agent tools | Unauthorized actions | Least privilege, human approval for risky calls |
A useful shortcut for language model agents is the lethal trifecta: access to private data, exposure to untrusted content and the ability to communicate externally. When all three appear in one component, data exfiltration through prompt injection becomes a realistic threat that should drive architecture decisions.
Frameworks and reference catalogs
No single standard defines AI threat modeling, so practitioners combine a process method with an AI threat catalog. The process method structures the work, and the catalog ensures that known attack techniques are not missed.
| Framework | Type | Best use |
|---|---|---|
| STRIDE | Threat classification method | Systematic review per diagram element |
| MITRE ATLAS | Catalog of adversary tactics and techniques | Mapping realistic attack paths |
| OWASP Top 10 for LLM Applications | Risk list for language model apps | Quick coverage check for LLM products |
| OWASP Machine Learning Security Top 10 | Risk list for classic ML | Coverage for training and inference risks |
| NIST AI 100-2 | Taxonomy of adversarial machine learning | Consistent terminology and attack classes |
| Secure AI Framework | Control framework | Linking threats to organizational controls |
Attack trees remain valuable for high-impact scenarios, such as an agent sending customer data to an external address. They break the goal into concrete steps, which makes it easier to see where a single control breaks the chain.
Running an AI threat modeling session
An effective session brings together ML engineers, application developers, security specialists and a product owner, because no single role understands both the model behavior and the business impact. The output is a prioritized list of threats with owners, not a one-time document.
- Scope the system, including data sources, model provenance, third-party APIs and agent permissions.
- Draw the data flow diagram and mark every trust boundary, especially where untrusted text enters a prompt.
- Enumerate threats per element with STRIDE and an AI catalog such as MITRE ATLAS.
- Rate likelihood and impact, considering attacker access: white-box, black-box or only indirect content.
- Assign mitigations and owners, then verify them through red teaming and automated scanners such as garak or PyRIT.
- Revisit the model whenever data sources, tools, models or permissions change.
Prioritization should favor architectural controls over filters. A classifier that blocks malicious prompts reduces risk, but removing an unnecessary tool permission or requiring human confirmation for irreversible actions removes entire threat classes.
Limitations and common mistakes
AI threat modeling faces a fundamental limit: model behavior cannot be fully specified, so no list of threats is complete. New jailbreak techniques appear regularly, and a mitigation that works for one model version may fail after an update. The analysis must therefore be treated as a living artifact, not a compliance checkbox.
- Modeling only the model, while ignoring data pipelines, plugins and the surrounding application.
- Assuming the system prompt is secret or that it reliably constrains behavior.
- Trusting model output as safe input for code execution, SQL queries or web pages.
- Ignoring the supply chain, including pretrained weights, datasets and serialized model files.
- Performing the exercise once at design time and never updating it after new tools are added.
In plain words
Before building a bank vault, engineers ask how a thief could get in. AI threat modeling asks the same question about an AI system. It is planned thinking about attacks before they happen.
AI systems have unusual weak points. Someone can feed them bad training data. Someone can hide commands in a document that the AI reads. An AI assistant with access to email could be tricked into sending private files. Threat modeling lists these risks. It then decides which defenses matter most. The list is updated whenever the system changes.
A real-world example
A software company plans an AI assistant that reads support tickets, searches internal documentation and can issue refunds of up to 200 dollars. Before launch, the security team runs a two-hour threat modeling session with the ML engineers and the support product owner.
The data flow diagram shows that customer-written ticket text flows directly into the prompt, while the assistant also holds a refund tool and email access. The team identifies indirect prompt injection as the top threat: a ticket could instruct the model to refund an attacker or forward account data.
The mitigations follow from the diagram. Email access is removed, refunds above 50 dollars require human approval, ticket text is marked as untrusted data in the prompt, and every tool call is logged. A red team test with 300 injection attempts afterward produces no unauthorized refunds, and the threat model is scheduled for review with each new tool.