Open framework · CC BY-NC 4.0

The Threat Modeling Framework

The Threat Modeling Framework describes the activities and components needed to threat-model a system in a structured way, from the outside factors that shape a threat model to the core threats and security requirements. Its author is Tejvir Singh, founder of Ayurak; version 1.0, published on 27 July 2024, was co-written with Nick Kirtley. It is free to use under CC BY-NC 4.0.

The November 2026 update adds the threats that come with AI as it is used today: AI agents with their own credentials, assistants that search company documents, prompt injection, AI coding assistants, AI spend and AI features switched on inside existing software. The added pairs are marked 2026 in each area; the version 1.0 pairs are unchanged.

It aims for a step-by-step approach that is easy to use in an enterprise, fits the architecture, development and security processes a company already has, and works at any stage of the development lifecycle.

Source on GitHub

How the framework is built

Inputs
Regulatory requirements, security policies, threat intelligence and threat actors feed the threat model. They vary by industry, geography and business.
Exposure
The application in scope has external and internal exposure, and both should be identified.
Features
The application's features and use cases shape its threats, which can be found through abuse cases.
Applications, platforms and infrastructure
The type of application, its platforms and its infrastructure shape the threats and security requirements. The framework names platforms and infrastructure, applications, SaaS and AI.
Threats and security requirements
The main ingredient of the threat model: the nine core areas below, each pairing a threat with the requirement that answers it.

Identity & Access Management

Threats related to gaining unauthorized access to systems or data, or performing unauthorized actions.

ThreatSecurity requirement
Unauthorized access is gained from a compromised passwordUse multi-factor authentication (MFA) when accessing all parts of the system
Unauthorized access is gained from compromised credentialsUse single sign-on (SSO) where possible
Privileged access is gained through abusing complicated access rightsUse role-based access control (RBAC), with a clear overview of roles, the rights per role, and the users assigned to roles
Users who should no longer have access gain unauthorized access using existing rightsPerform periodic access reviews for all users, administrators and highly privileged users
Unauthorized (and privileged) access is gained by abusing non-personal or system accountsManage non-personal accounts, high-privileged accounts and service accounts effectively
Users abuse access rights that are not requiredApply least privilege: users only have the access rights they need
Users abuse sensitive functions and access rightsUse segregation of duties for privileged or highly sensitive actions
2026AI agents act with broad, shared or standing credentialsGive each agent its own identity with scoped, short-lived credentials and a named owner
2026Agent identities outlive the project they were made forSet an end date on every agent identity when its access is approved, and have the owner renew it

Data Security & Privacy

Threats related to gaining or intercepting unencrypted business, technical or personal data.

ThreatSecurity requirement
Data is intercepted via the networkEncrypt confidential data in transit
Data is maliciously retrieved from a database or systemEncrypt confidential data at rest
Encrypted traffic or files are decrypted using stolen keys or secretsManage security and encryption keys securely using proven systems and processes
Unauthorized access to data by or through a service or cloud providerUse customer-managed keys when hosting data or systems in public cloud environments
2026Staff paste confidential or personal data into AI toolsKeep a list of approved AI tools, state what may be pasted into them, and check traffic to unapproved ones
2026Prompts, outputs and assistant memory keep personal data with no ownerTreat prompt logs and assistant memory as data stores, with retention, access control and deletion
2026An AI assistant returns documents the user may not openRun retrieval with the asking user's own permissions, and remove deleted or restricted files from the index

Infrastructure Security

Threats related to exploiting configuration weaknesses in systems and unauthorized network access to systems or data.

ThreatSecurity requirement
Misconfigurations are abused for unauthorized access or disruptionHarden all technical components of the system
Unnecessary services, pages or ports are abusedRemove unnecessary services that are on by default or were enabled during development
Sensitive pages or services are accessed externallyReduce the exposure of services, web pages and administrator panels
Outdated software with vulnerabilities is abusedApply security patches to the technical components of the system
Exposed secrets or tokens are used for abuse or accessManage secrets and tokens in a vault or similar technology
Production data is lost in the development or testing phaseUse separate development, test, acceptance and production environments
Critical technical components are abused from external networksSegment internal parts of the solution at the network level
Services and ports are maliciously accessed from external networksUse a firewall between trusted and untrusted zones
Attackers hop from one network or application zone to anotherUse firewalls or other network filtering between applications and infrastructure (micro-segmentation)
2026Secrets pasted into AI tools end up in prompt logsScan prompt logs for secrets the way repositories are scanned, and rotate anything found
2026AI tool servers and model endpoints are exposed without authenticationInventory every AI endpoint and tool server, and require authentication on each

Security Logging, Monitoring & Response

Threats related to abuse that goes undetected, or is not identified and remediated.

ThreatSecurity requirement
Security events at infrastructure level are not identifiedLog technical events at the infrastructure level
Security events at application level are not identifiedLog important events at the application level
Security events are not analyzed by security professionalsActively monitor critical events at infrastructure and application level
Security events are not resolved by security professionals or the SOCHave response measures by the SOC or other security professionals for critical events
2026Agent actions cannot be reconstructed after an incidentLog every agent tool call with the agent's identity, the input and the result
2026A misbehaving agent cannot be stopped quicklyKeep a tested way to stop each agent: revoke its credentials and confirm its calls are refused

IT Resilience

Threats related to disrupting the availability of systems or data.

ThreatSecurity requirement
Data is lost in a cyber event or attackPerform periodic backups of systems and data
Data is lost in a ransomware attackPerform air-gapped backups of systems and data
Systems or data cannot be recovered after a cyber attackPerform regular recovery tests using backup data
Processes cannot recover after a cyber attackHold regular business continuity sessions to recover from a simulated attack or outage
Systems are down due to a single point of failureBuild redundancy into systems and processes with high availability requirements
2026An AI provider outage stops a business processWrite down the manual fallback for each AI-dependent process, who still knows it, and when to switch
2026The AI provider changes terms or ends a serviceKeep an exit plan per provider: data export, a second option, and the time to move

Secure Development

Threats related to insecure development processes and tooling.

ThreatSecurity requirement
Vulnerabilities and weaknesses in the code base are abusedUse code scanning tools on newly developed or committed code
Malicious code is added to the code base by an insiderApply the four-eyes principle to newly committed code
The system is abused via dependencies or librariesUse only trusted and secured dependencies, frameworks and libraries, and scan them for known vulnerabilities
Previously unidentified vulnerabilities or weaknesses are abusedPentest newly developed applications, and after major changes
2026AI coding assistants add packages that do not exist or were planted by attackersTreat every dependency added in an AI-assisted change as new: install from an internal mirror and review who publishes it
2026AI-written code is merged without the usual checksApply the same review, scanning and testing to AI-written code as to any other code

Cloud Security

Threats related to attacks on cloud-based applications and infrastructure.

ThreatSecurity requirement
Misconfigurations expose confidential or technical dataContinuously monitor for cloud misconfigurations and use infrastructure as code
Unauthorized access to cloud accounts or resourcesEnforce MFA, granular access controls and least privilege
Lack of visibility into cloud activityDeploy cloud security monitoring and logging
API vulnerabilities lead to unauthorized accessSecure APIs with authentication, authorization, input validation and thorough security testing
Exposed access keys compromise cloud storageManage and rotate storage keys, credentials and secrets securely, with strong access controls
Essential cloud services are subject to network-based unauthorized accessApply network micro-segmentation around cloud services, applications and assets
DDoS attacks on cloud services cause costly downtimeUse cloud-based DDoS prevention at network and application level
2026AI features or agents run up cost in loops nobody noticesSet a spend cap per AI feature and per agent, enforced in the code that makes the calls, with an alert before it is reached

Attack Surface Management

Threats related to attacks on externally facing assets, applications and infrastructure.

ThreatSecurity requirement
Unknown assets expand the attack surfaceContinuously discover and inventory assets using automated tools
Externally facing weaknesses are attacked and used as a stepping stoneMinimise exposure, harden systems and implement strong perimeter defences
Outdated software with known vulnerabilities is attackedRun continuous external vulnerability management and patch in time
Emerging threats are exploited before they are identifiedIntegrate threat intelligence feeds and analysis into the security programme
Unsecured subdomains lead to website takeoverConfigure and secure all subdomains, and include them in attack surface assessments
Externally facing open ports and services are discovered by attackersMinimise open ports, use firewalls and configure secure cloud security groups
2026AI tools and AI features inside existing software are in use without anyone knowingContinuously discover AI systems, including AI features switched on in existing SaaS, and keep an inventory with owners

AI Security

Threats related to abuse of AI applications, services or features.

ThreatSecurity requirement
Data poisoning leads to incorrect or malicious AI outputValidate training data, implement data integrity checks and secure data storage
Model manipulation by backdooring, theft or evasionDevelop AI models securely, enforce access controls and test integrity regularly
Unethical AI use: bias, privacy violations, lack of transparencyDefine and follow ethical guidelines, mitigate bias, use privacy-preserving techniques and ensure transparency
Reverse engineering of AI models exposes intellectual propertyPrevent reverse engineering, for example with code obfuscation or secure enclaves
Missing model monitoring lets degradation or malicious drift go undetectedMonitor model performance and behaviour over time to detect anomalies and breaches
Insufficient testing lets unexpected vulnerabilities be exploited in productionTest AI systems with diverse inputs, including adversarial examples, before deployment
2026Instructions hidden in documents, emails or web pages steer the AI (prompt injection)Treat everything the AI reads as untrusted, limit what it can do with it, and require a person's approval for high-impact actions
2026An agent calls tools or reaches data beyond its taskGive each agent an allow-list of tools and data, checked on every call
2026The provider changes the model behind an approved systemRecord the model and version for each AI system, and re-test before accepting a change
2026Wrong AI output is used as fact in decisions about people or customersRequire human review where AI output affects people, customers or money, and record who reviewed it

Questions people ask

Who wrote the Threat Modeling Framework?
Tejvir Singh, founder of Ayurak, who also wrote the 2026 AI update. Version 1.0, published on 27 July 2024 by Aristiun, was co-written with Nick Kirtley.
Is it free to use?
Yes, under the Creative Commons Attribution-NonCommercial 4.0 licence. The source is on GitHub.
How does it relate to STRIDE or MITRE ATT&CK?
It is a structure for the whole threat model: what feeds it, what is exposed, and a baseline of threats with their requirements in nine areas. A team can still use STRIDE to find threats per component, or ATT&CK to describe attacker techniques, inside that structure.
What does the 2026 update add?
Threats and requirements for AI as it is used now: agent identities and credentials, assistants that search company documents, prompt injection, tool permissions for agents, stopping an agent, AI coding assistants, AI spend, model changes by providers, and AI features inside existing software. They sit in the same nine areas, so a team does not need a separate AI framework to start.
Which areas does it cover?
Identity & Access Management, Data Security & Privacy, Infrastructure Security, Security Logging, Monitoring & Response, IT Resilience, Secure Development, Cloud Security, Attack Surface Management and AI Security.

Using it in practice