-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Add architectural threat modeling checklist for workflow and state abuse #1267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
balaakasam
wants to merge
3
commits into
OWASP:master
Choose a base branch
from
balaakasam:architectural-threat-modeling-checklist
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+115
−0
Open
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
101 changes: 101 additions & 0 deletions
101
...cklists/Architectural_Threat_Modeling_Checklist_for_Workflow_and_State_Abuse.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,101 @@ | ||
| # Architectural Threat Modeling Checklist for Workflow and State Transition Abuse | ||
|
|
||
| ## Overview | ||
|
|
||
| Modern distributed applications frequently fail not because of traditional vulnerabilities, but due to architectural flaws in workflow enforcement, state management, and API orchestration. This checklist helps identify abuse cases where attackers manipulate valid sequences to bypass business controls. | ||
|
|
||
| --- | ||
|
|
||
| ## 1. State Transition Enforcement | ||
|
|
||
| | Check | Description | | ||
| |------|-------------| | ||
| | ☐ | All business workflows have an explicit server-side state machine | | ||
| | ☐ | Backend validates that transitions occur only from allowed previous states | | ||
| | ☐ | State is never inferred from client input | | ||
| | ☐ | State changes are atomic | | ||
| | ☐ | Invalid or out-of-order transitions are rejected | | ||
| | ☐ | State change failures are logged with high severity | | ||
|
|
||
| --- | ||
|
|
||
| ## 2. Multi-Step Workflow Validation | ||
|
|
||
| | Check | Description | | ||
| |------|-------------| | ||
| | ☐ | Each workflow step has mandatory prerequisites | | ||
| | ☐ | API endpoints enforce correct step ordering | | ||
| | ☐ | Replay of previously valid steps is blocked | | ||
| | ☐ | Tokens are scoped to workflow state | | ||
| | ☐ | Workflow cancellation is fully enforced server-side | | ||
|
|
||
| --- | ||
|
|
||
| ## 3. API Sequence Integrity | ||
|
|
||
| | Check | Description | | ||
| |------|-------------| | ||
| | ☐ | APIs require sequence tokens or state hashes | | ||
| | ☐ | Server rejects API calls that skip intermediate steps | | ||
| | ☐ | Cross-service calls verify upstream workflow state | | ||
| | ☐ | Retry logic cannot advance state incorrectly | | ||
|
|
||
| --- | ||
|
|
||
| ## 4. Cross-Layer Authorization Consistency | ||
|
|
||
| | Check | Description | | ||
| |------|-------------| | ||
| | ☐ | UI restrictions are never relied on for authorization | | ||
| | ☐ | All hidden UI actions are verified server-side | | ||
| | ☐ | API endpoints are reviewed for orphaned permissions | | ||
| | ☐ | Role changes propagate across services in real time | | ||
|
|
||
| --- | ||
|
|
||
| ## 5. Distributed System Abuse | ||
|
|
||
| | Check | Description | | ||
| |------|-------------| | ||
| | ☐ | Event-driven services validate ordering guarantees | | ||
| | ☐ | Idempotency is enforced on state transitions | | ||
| | ☐ | Partial failures cannot leave workflows in exploitable states | | ||
| | ☐ | Asynchronous queues cannot be abused to bypass checks | | ||
|
|
||
| --- | ||
|
|
||
| ## 6. Telemetry and Detection | ||
|
|
||
| | Check | Description | | ||
| |------|-------------| | ||
| | ☐ | Workflow state transitions are logged centrally | | ||
| | ☐ | Alerts exist for impossible transitions | | ||
| | ☐ | Telemetry detects API misuse patterns | | ||
| | ☐ | Incident playbooks include workflow abuse scenarios | | ||
|
|
||
| --- | ||
|
|
||
| ## 7. Threat Modeling Coverage | ||
|
|
||
| | Check | Description | | ||
| |------|-------------| | ||
| | ☐ | Threat models include abuse of valid sequences | | ||
| | ☐ | Architecture reviews consider logic and workflow risks | | ||
| | ☐ | Abuse cases are reviewed quarterly | | ||
| | ☐ | Product teams test at least one workflow abuse scenario per release | | ||
|
|
||
| --- | ||
|
|
||
| ## Example Abuse Scenarios | ||
|
|
||
| - Confirming orders without payment | ||
| - Approving refunds without prior authorization | ||
| - Skipping approval workflows via API | ||
| - Replaying legacy endpoints removed from UI | ||
|
|
||
| --- | ||
|
|
||
| ## Objective | ||
|
|
||
| Prevent attackers from abusing legitimate application flows to achieve unauthorized outcomes by enforcing architectural integrity across UI, API, and backend layers. | ||
|
|
||
15 changes: 15 additions & 0 deletions
15
...pendix/Architectural_Threat_Modeling_for_Workflow_and_State_Transition_Abuse.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # Architectural Threat Modeling for Workflow and State Transition Abuse | ||
|
|
||
| Modern application security failures increasingly arise not from traditional coding defects, but from architectural flaws in how workflows, APIs, and distributed services enforce business logic. | ||
|
|
||
| Security testing tools are effective at detecting injection flaws and misconfigurations, but they rarely identify abuse scenarios that follow valid execution paths. | ||
|
|
||
| In distributed and API-driven environments, attackers manipulate state transitions, replay legitimate tokens, and invoke backend functionality out of intended order. These attacks do not appear anomalous to scanners or WAFs because every individual call is technically valid. | ||
|
|
||
| This class of risk—workflow and state-transition abuse—requires architectural threat modeling rather than vulnerability enumeration. Testing must begin by mapping application state machines and identifying required prerequisites before each action is authorized. | ||
|
|
||
| For example, payment workflows often assume that the “confirm order” action can only occur after successful payment processing. In practice, many APIs accept confirmation requests based solely on token presence rather than verified transaction state. | ||
|
|
||
| Security teams must therefore validate not only authentication, but whether the workflow is in the correct state for the requested operation. This requires server-side state machines, idempotency enforcement, and telemetry capable of detecting impossible transitions. | ||
|
|
||
| As enterprises increasingly adopt microservices, asynchronous messaging, and event-driven designs, the attack surface expands beyond what traditional scanning tools observe. Embedding architectural threat modeling into development lifecycles is now a Tier-1 security requirement. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.