Back to blog

Blog

STRIDE Threat Model Example: A Web App, Threat by Threat

A full STRIDE threat model example for a web application: the data flow diagram, trust boundaries, 18 real threats, and the mitigations reviewers expect.

STRIDE threat model exampleUpdated 11/12/2026Shafi Khan

STRIDE Threat Model Example: A Web App, Threat by Threat

Here's a STRIDE threat model example you can actually steal: a normal web application, drawn as a data flow diagram, split by trust boundaries, and walked through all six STRIDE categories with real threats and real mitigations. The short version: draw the system, find every place data crosses a trust boundary, ask the six STRIDE questions at each one, and write down an owner and a response for every threat.

Most STRIDE explainers stop at the acronym. Cool, you now know what the "R" stands for. That doesn't help when the security review is on Thursday and the only diagram you have is the one nobody updated since 2023.

So this post does the opposite. One concrete app, one concrete model, every threat written down.

STRIDE categories explained in 60 seconds

STRIDE is a mnemonic from Microsoft for six kinds of threats. Each one is the violation of a security property, which is the bit that makes it useful: if you know which property you're protecting, you know what kind of control fixes it.

CategoryWhat it meansProperty it violatesWeb app smell
SpoofingPretending to be another user or systemAuthenticationStolen session cookie, forged webhook
TamperingModifying data you shouldn'tIntegrityEdited hidden form field, altered queue message
RepudiationDenying an action with no way to prove otherwiseAccountabilityAdmin deletes data, no audit trail
Information disclosureExposing data to the wrong peopleConfidentialityVerbose errors, public bucket, IDOR
Denial of serviceMaking the system unavailable to valid usersAvailabilityUnlimited login attempts, unbounded uploads
Elevation of privilegeGaining access rights you weren't grantedAuthorizationUser hits an admin endpoint, SSRF to metadata

The definitions above follow Microsoft's Threat Modeling Tool threat reference, and the property mapping matches the one in the OWASP Threat Modeling Cheat Sheet. OWASP is clear that STRIDE is one technique among several (attack trees, LINDDUN for privacy, PASTA and others), but for technical design reviews of a web app it's the fastest way to get coverage without a PhD.

→ Run the six STRIDE prompts against your own system with the free STRIDE Threat Checklist

The four questions behind any STRIDE threat model

Before the example, the frame. OWASP's cheat sheet organizes threat modeling around four questions from the Threat Modeling Manifesto:

  1. What are we working on? Draw the system.
  2. What can go wrong? This is where STRIDE lives.
  3. What are we going to do about it? Pick a response for each threat.
  4. Did we do a good enough job? Review, test, repeat.

Skip question 1 and question 2 becomes vibes. Skip question 3 and you've written a scary list nobody acts on. Skip question 4 and the model is stale by the next sprint. We'll hit all four.

→ Turn those four questions into a reusable review doc with the threat model template

Step 1: The example web application and its data flow diagram

Our example is a deliberately boring B2B SaaS app, because boring is what most of us actually run:

  • Browser (the user's SPA)
  • CDN + WAF in front of everything
  • Load balancer terminating TLS
  • API service (stateless containers)
  • Background worker that consumes jobs from a queue
  • PostgreSQL as the primary database
  • Object storage bucket for user uploads
  • Identity provider (OIDC) for login
  • Payment provider that calls us back via webhooks
  • Admin console, used by support staff

As a data flow diagram (DFD), the elements break down like this. The cheat sheet's advice is to show processes, data stores, data flows, external entities and trust boundaries, because "these often represent possible attack points."

DFD element typeElements in our app
External entitiesEnd user, support staff, identity provider, payment provider
ProcessesCDN/WAF, load balancer, API service, worker, admin console
Data storesPostgreSQL, object storage, queue
Data flowsBrowser → API, API → DB, API → queue, worker → DB, payment webhook → API, API → IdP, API → storage (presigned URLs)

Data flow diagram trust boundaries

A trust boundary is anywhere the level of trust changes. In this app there are four that matter:

  1. Internet → edge (browser and webhooks hitting the CDN/WAF)
  2. Edge → private network (load balancer to API service)
  3. Application tier → data tier (API and worker to PostgreSQL, queue, storage)
  4. Our system → third parties (IdP and payment provider)

Plus one people love to forget: support staff → admin console. Insiders and compromised staff laptops are a trust boundary too.

Rule of thumb: every data flow that crosses a boundary gets the full STRIDE treatment. Flows inside a boundary still get reviewed, just with less paranoia.

→ Generate this kind of diagram from a plain-English description with Architect AI

Step 2: STRIDE threat modeling for a web application, element by element

Here's the meat. Each row is a threat written the way it should appear in a register: specific, attached to an element, with a control you could actually ticket. Eighteen threats, three per category.

Spoofing threats

IDElementThreatMitigation
S1Browser → APIAttacker steals a session token via XSS and replays itHttpOnly, Secure, SameSite cookies; Content Security Policy; short session lifetimes
S2Payment webhook → APIAttacker posts a fake "payment succeeded" webhookVerify the provider's webhook signature and timestamp; reject unsigned or stale events
S3API → IdPLogin flow accepts tokens issued for a different clientValidate iss, aud, exp and signature on every ID token; use PKCE

Tampering threats

IDElementThreatMitigation
T1Browser → APIUser edits a hidden field (price, account_id) before submitNever trust client-supplied authority fields; derive them server-side
T2QueueAttacker with network access injects or edits job messagesRestrict producers by IAM; sign or validate message schema in the worker
T3Object storageUploaded file overwrites another tenant's objectServer-generated object keys scoped by tenant; presigned URLs limited to one key and short expiry

Repudiation threats

IDElementThreatMitigation
R1Admin consoleSupport agent changes a customer's plan and denies itImmutable audit log of admin actions with actor, target, before/after values
R2API serviceUser disputes deleting a projectRecord who did what and when for destructive actions, with request IDs
R3LogsAttacker with app access wipes the logs that would show themShip logs to a separate account or store the app role can write to but not delete from

Information disclosure threats

IDElementThreatMitigation
I1API serviceIDOR: changing /invoices/123 to /invoices/124 returns another tenant's invoiceObject-level authorization check on every read, scoped by tenant
I2API → BrowserStack traces and SQL errors leak in production responsesGeneric error bodies; detailed errors only in server logs
I3Object storageBucket or objects accidentally publicBlock public access at the account/bucket level; serve via presigned URLs only

Denial of service threats

IDElementThreatMitigation
D1Edge / APICredential-stuffing bursts on /loginWAF rate-based rules; per-account and per-IP throttling
D2API → PostgreSQLExpensive search query exhausts the connection poolPagination limits, statement timeouts, connection pooling, query budgets
D3WorkerOne giant upload job blocks the queue for everyoneSize limits at upload, per-tenant concurrency caps, dead-letter queue

Elevation of privilege threats

IDElementThreatMitigation
E1API serviceRegular user calls an admin-only endpoint that only hides its button in the UIRole checks enforced server-side on every route, deny by default
E2API serviceSSRF via "import from URL" reaches the cloud metadata endpoint and grabs credentialsAllowlist outbound destinations; block link-local ranges; require IMDSv2-style session tokens where available
E3WorkerWorker's IAM role can read every bucket and write every tableLeast-privilege role per workload; separate roles for API and worker

Notice something? Most of these aren't exotic. They're the stuff that turns up in real incident write-ups again and again. That's the point of a STRIDE threat model example: it forces you to look at the boring holes before someone else does.

→ Point Threat Analyzer at your own architecture and get STRIDE-driven findings on the actual diagram

Step 3: Decide what to do about each threat

A list of 18 scary rows is not a threat model. It's an anxiety spreadsheet. Question 3 is where each threat gets a response. OWASP lists four, attributed to Adam Shostack:

  • Mitigate: reduce the likelihood (most of the table above)
  • Eliminate: remove the feature causing the threat (do you need "import from URL"?)
  • Transfer: move responsibility to another party, noting that this doesn't itself reduce the likelihood or impact
  • Accept: consciously live with it when nothing else fits the business constraints

Write the decision down in a format that survives a reorg. Here's a register entry for E2 in plain YAML:

- id: E2
  title: SSRF via import-from-URL reaches cloud metadata endpoint
  category: elevation-of-privilege
  element: api-service
  boundary: application-tier -> internet
  response: mitigate
  controls:
    - Outbound allowlist for the import fetcher
    - Block 169.254.0.0/16 and other link-local or private ranges
    - Run the fetcher with a role that has no data-store permissions
  owner: platform-team
  status: in-progress
  verify: Integration test that requests to 169.254.169.254 are refused

For network-level controls, make the diagram and the code say the same thing. If the DFD says "only the app tier talks to PostgreSQL," the Terraform should prove it:

resource "aws_security_group_rule" "db_from_app" {
  type                     = "ingress"
  from_port                = 5432
  to_port                  = 5432
  protocol                 = "tcp"
  security_group_id        = aws_security_group.db.id
  source_security_group_id = aws_security_group.app.id
  description              = "Postgres from app tier only"
}

No 0.0.0.0/0, no "temporary" bastion rule from 2024. If the rules and the diagram disagree, trust the rules and fix the diagram.

→ Check what your security group rules actually allow with the free Security Group Rule Visualizer

Step 4: Did we do a good enough job?

Question 4 is the one teams skip, and it's why threat models rot. A quick checklist before you call it done:

  • Every external entity and every boundary-crossing flow has been through all six STRIDE categories
  • Every threat has an owner, a response and a status
  • "Accept" decisions have a named approver, not "the team"
  • Mitigations are linked to tickets, tests or config, not just prose
  • The DFD matches what's deployed (security groups, IAM roles, public endpoints)
  • Third-party integrations (IdP, payments, email, analytics) are on the diagram
  • There's a trigger to update the model: new entry point, new data store, new vendor

That last item matters most. A threat model is a snapshot of an architecture, and architectures move. The cheat sheet's own advice is to save the model "in a form the team can update." A diagram in a slide deck is not that.

→ Use the Architecture Review Checklist for Cloud Applications to fold this into your design reviews

Common mistakes in STRIDE threat models

A few patterns that make reviewers sigh:

  • Threat modeling the logo, not the system. "The API" is not one element. The public API, the admin API and the webhook endpoint have different trust levels and different threats.
  • Forgetting the humans. Support tooling and CI/CD pipelines have more power than most end users. Put them on the diagram.
  • Generic mitigations. "Use encryption" is not a control. "TLS 1.2+ at the load balancer, encryption at rest with a customer-managed key on the database" is.
  • Treating STRIDE as a checklist to tick once. It's a set of prompts. The value is in the arguments it starts.
  • Ignoring privacy. STRIDE is about security. If you handle personal data, MDN's threat modeling frameworks overview points to LINDDUN as the privacy-focused counterpart.

If your trust boundaries feel fuzzy, that's usually the real problem, and every STRIDE row downstream inherits the fuzz.

→ Get the boundaries right first with the trust boundaries explainer

Key takeaways

  • A useful STRIDE threat model example starts with a data flow diagram and explicit trust boundaries, not with the acronym.
  • Map each STRIDE category to the property it violates (authentication, integrity, accountability, confidentiality, availability, authorization) and the right control becomes obvious.
  • Apply all six categories to every boundary-crossing flow; give every threat an ID, owner, response and verification.
  • Prefer concrete, testable mitigations, and make sure your IaC agrees with your diagram.
  • Keep the model next to the architecture so it changes when the architecture does.

→ Review exposure and trust assumptions across the whole design with Security Posture

FAQ

What is an example of a STRIDE threat model?

A typical example takes a web application (browser, CDN, load balancer, API service, background worker, queue, PostgreSQL database, object storage, identity provider and a payment provider), draws it as a data flow diagram with trust boundaries, then walks each element through the six STRIDE categories: spoofing, tampering, repudiation, information disclosure, denial of service and elevation of privilege. Each threat is written down with an owner, a response (mitigate, eliminate, transfer or accept) and the control that addresses it.

What are the 6 STRIDE categories and what do they violate?

Spoofing violates authentication, tampering violates integrity, repudiation violates accountability (non-repudiation), information disclosure violates confidentiality, denial of service violates availability, and elevation of privilege violates authorization. Each category works as a prompt: ask how it could happen at every process, data store, data flow and external entity in the diagram.

How do you do STRIDE threat modeling for a web application?

Answer four questions in order: what are we working on (draw the data flow diagram and mark trust boundaries), what can go wrong (apply the STRIDE categories to every element and every flow that crosses a boundary), what are we going to do about it (pick a response and a concrete control for each threat), and did we do a good enough job (review the register, test the controls, and update the model when the architecture changes).

How often should a STRIDE threat model be updated?

Update it whenever the architecture changes in a way that adds an entry point, a data store, a third-party integration or a new trust boundary, and revisit it during regular design reviews. A threat model stored next to the diagram it describes is far easier to keep current than a spreadsheet that lives somewhere else.

→ Bring your next design review into Threat Analyzer instead of a stale spreadsheet

Ship the threat model, not just the diagram

The difference between a team that threat models and a team that says it threat models is whether the model lives next to the architecture. Draw the system once, mark the boundaries, run STRIDE against the real topology, and keep the findings attached to the design so the next change triggers the next review.

Architecto lets you generate the architecture with Architect AI, then run Threat Analyzer on that same diagram to surface threat findings and mitigation guidance while the design is still cheap to change.

→ Start free on Architecto and threat model your next architecture before it ships

FAQ

Questions readers ask before they act on this page.

What is an example of a STRIDE threat model?

A typical example takes a web application (browser, CDN, load balancer, API service, background worker, queue, PostgreSQL database, object storage, identity provider and a payment provider), draws it as a data flow diagram with trust boundaries, then walks each element through the six STRIDE categories: spoofing, tampering, repudiation, information disclosure, denial of service and elevation of privilege. Each threat is written down with an owner, a response (mitigate, eliminate, transfer or accept) and the control that addresses it.

What are the 6 STRIDE categories and what do they violate?

Spoofing violates authentication, tampering violates integrity, repudiation violates accountability (non-repudiation), information disclosure violates confidentiality, denial of service violates availability, and elevation of privilege violates authorization. Each category works as a prompt: ask how it could happen at every process, data store, data flow and external entity in the diagram.

How do you do STRIDE threat modeling for a web application?

Answer four questions in order: what are we working on (draw the data flow diagram and mark trust boundaries), what can go wrong (apply the STRIDE categories to every element and every flow that crosses a boundary), what are we going to do about it (pick a response and a concrete control for each threat), and did we do a good enough job (review the register, test the controls, and update the model when the architecture changes).

How often should a STRIDE threat model be updated?

Update it whenever the architecture changes in a way that adds an entry point, a data store, a third-party integration or a new trust boundary, and revisit it during regular design reviews. A threat model stored next to the diagram it describes is far easier to keep current than a spreadsheet that lives somewhere else.

Related reading

Keep moving through the architecture workflow.

Free tool

STRIDE Threat Checklist

Walk through spoofing, tampering, repudiation, information disclosure, denial of service, and elevation risks using a deterministic system model.

threat modeling checkliststride templatesecurity review checklist

Free tool

Security Group Rule Visualizer

See inbound and outbound exposure patterns across security group rules before a review turns into line-by-line spreadsheet work.

aws security group analyzerfirewall rule visualizersecurity group matrix

Free tool

Architecture Review Checklist Builder

Build repeatable review packets for cloud architectures, migrations, data systems, and internal platforms without relying on static spreadsheets.

system design review checklistarchitecture governance checklistdesign review template

Guide

threat models checklist for Security Architecture

threat models checklist for Security Architecture with technical review guidance, practical artifacts, and a workflow path into diagrams, documentation, and architecture governance.

security architecturethreat modelsapplication security architecture

Guide

What trust boundaries means in Security Architecture

What trust boundaries means in Security Architecture with technical review guidance, practical artifacts, and a workflow path into diagrams, documentation, and architecture governance.

security architecturetrust boundariesapplication security architecture

Comparison

Best Draw.io alternative for architecture review

Best Draw.io alternative for architecture review with a workflow-first comparison across diagrams, architecture review, technical documentation, and code-adjacent implementation evidence.

draw.io alternativearchitecto vs draw.ioarchitecture review workflow alternative
STRIDE Threat Model Example: A Web App, Threat by Threat | Architecto