Authorised testing. Evidence that matters.Atlant Security
Pentest/ServicesBY ATLANT SECURITY
Build your scope Free brief builder

Application security

Business Logic Pentesting: A State-Transition Test Matrix

Build a practical state-transition matrix for approvals, cancellation, retries, delegated authority and asynchronous workflows, with safe fixtures and evidence.

Discuss your requirements
Precision mechanical gates illustrating controlled transaction transitions

Business logic testing starts with what must never happen

Business logic penetration testing examines whether an application can be made to perform an action that violates its intended business rules, even when individual requests are technically valid. A state-transition matrix makes those rules testable. It describes the object, its current state, the actor, the requested transition, the conditions that must hold and the side effects that may occur.

This guide provides a practical method for authorised testing of approvals, orders, subscriptions, refunds and similar workflows. It focuses on sequencing and state rather than repeating a general catalogue of application vulnerabilities. All examples use fictional systems and synthetic records. They are test-design examples, not instructions to manipulate real transactions or claims about an actual engagement.

Use the matrix within an agreed penetration test, with application owners available to explain intended behaviour. A tester cannot reliably identify a business-rule violation without understanding the rule. Documentation, interviews and controlled observations work together: a diagram may describe the intended process, while the running system reveals where that process is actually enforced.

Model objects, states and transitions separately

Choose a business object such as an order, payout request, supplier record or access invitation. List its meaningful states in business language. For an illustrative order, these might include draft, submitted, approved, fulfilled and cancelled. Do not assume that a status label in the interface is the authoritative state; the backend may use several records, events or flags to represent the same business condition.

For each transition, identify the component that decides whether it is allowed. The browser may hide a button, but the API, worker or service must enforce the rule when the request is processed. Record where the authoritative state is stored and how related services learn about changes. This helps distinguish a cosmetic interface restriction from a control that protects the business operation.

Include transitions that are easy to overlook: reopening, retrying, expiring, rejecting, partially completing and recovering from failure. Security problems often occur at those edges because they receive less attention than the happy path. A cancelled object that can still trigger fulfillment, or an expired invitation that can still establish access, deserves an explicit test condition.

ObjectStateTransitionRequired condition
Synthetic orderSubmittedApproveActor has approval authority for this order
Synthetic orderApprovedFulfillApproval remains valid and order is not cancelled
Test invitationExpiredAcceptTransition must be refused
Test refundCompletedRepeatNo second financial effect may occur

Write invariants that survive changes to the interface

An invariant is a property that must remain true across the workflow. Examples include that a person cannot approve their own restricted request, that a cancelled order cannot be fulfilled, and that a refund cannot exceed the permitted refundable amount. Write these properties before choosing request variations. This keeps testing focused on business consequences rather than unusual inputs for their own sake.

Make each invariant precise enough to evaluate. “Payments are secure” is not a testable statement. “The authorised amount and destination must remain bound to the approval used for execution” is much more useful. It identifies the values that matter and the relationship that must persist. The application owner should confirm whether exceptions exist and how they are authorised.

Separate business policy from implementation preference. A workflow may legitimately allow a senior role to bypass an ordinary approval, provided that authority is explicit and recorded. The finding should not assume every exception is a vulnerability. Test whether the exception is limited to the right actor, scope and conditions, and whether its use produces the required evidence.

Separate actors and approval stages before testing authority boundaries.
Separate actors and approval stages before testing authority boundaries. Conceptual illustration, not evidence from a customer system.

Build the matrix around actor, state, object and effect

A useful row contains the starting state, actor, object relationship, requested action, required condition, expected result and evidence source. Add a fixture identifier and a cleanup instruction so another authorised tester can reproduce the setup. Keep credentials outside the matrix. The row should describe the security question without becoming a repository of sensitive access material.

Include both permitted and forbidden rows. If an operation fails for every actor because a dependency is unavailable, that does not establish that the intended rule works. A permitted control demonstrates that the workflow is functioning. The forbidden row then tests the relevant boundary under comparable conditions. Where possible, change one meaningful variable at a time to make the result interpretable.

Prioritise rows by impact and architectural uncertainty. Transitions that move money, grant access, publish data or trigger irreversible external actions deserve attention. So do transitions implemented differently across interfaces. A large matrix is not automatically a good matrix; it must cover the important relationships with enough depth to produce reliable observations.

Starting conditionActor/actionExpected observation
Draft owned by user AUser A submitsOne submitted object; no execution yet
Submitted by user AUser A self-approves without authorityNo approval or execution effect
Approved values later changedExecutor attempts completionApproval validity re-evaluated for changed values
Cancelled before processingWorker receives queued actionNo forbidden fulfillment side effect
Already completedSame operation retriedNo duplicate business effect

Create fixtures that cannot harm real customers

Use synthetic accounts, objects and downstream destinations. For financial workflows, agree a sandbox, simulated settlement or another explicit mechanism that prevents real fund movement. For messaging workflows, route notifications to controlled test recipients. For fulfillment, ensure no real shipment or service activation occurs. A visually labelled test order is not sufficient if a background integration treats it as production work.

Record the fixture’s dependencies. An order may trigger inventory reservation, accounting entries, email, analytics and supplier callbacks. The testing plan should identify which dependencies are active and which are replaced or observed. If a dependency is simulated, explain how that limits the conclusion. A sandbox test can establish application behaviour without proving the production integration behaves identically.

Agree cleanup and reconciliation before testing. Resetting the visible status may not reverse a ledger entry or remove a queued job. The owner should provide a supported way to retire the fixture and inspect relevant downstream state. Keep a ledger of test objects and actions so the team can account for every controlled side effect after the session.

Track the whole object lifecycle, including downstream records.
Track the whole object lifecycle, including downstream records. Conceptual illustration, not evidence from a customer system.

Test skipped, repeated and out-of-order transitions

Begin with the documented happy path to understand the normal sequence and evidence. Then test whether a later transition can be requested before its prerequisites exist. For example, can a synthetic object move directly from draft to execution without approval? The request may be syntactically valid; the security question is whether the server checks the current state and required authority when processing it.

Test repeated transitions where repetition could have an effect. A second completion request may be harmless if it returns the existing result, but harmful if it creates another operation. Distinguish response duplication from effect duplication. Inspect the authoritative record or controlled downstream result rather than assuming that two success responses mean two completed actions.

Test transitions after terminal states, such as cancellation or expiry. The expected behaviour should be defined by the owner. Some workflows allow reopening through a separate authorised process; others do not. The test should check that the reopening path has its own conditions rather than assuming every terminal state is permanent. Record the business rule and the observation together.

Bind approval to the values that were approved

An approval is meaningful only if it applies to the action eventually performed. Identify the fields whose changes should invalidate or renew approval: amount, destination, recipient, privilege, scope or effective date may matter. Ask whether the application binds approval to a version of the object or merely records that somebody approved it at some earlier point.

Using a synthetic object, obtain an approved state through the normal authorised process. Then change one agreed sensitive field through a permitted editing route and attempt the next transition. The expected result may be a return to pending approval, a refusal to execute, or another owner-defined control. The test should establish whether the old approval can authorise materially different work.

Consider indirect changes. A destination may be referenced through a supplier profile or linked configuration rather than stored directly on the object. Updating that related record can change the meaning of an already approved transaction. Include relevant dependencies in the matrix when the architecture permits them, and state which linked changes were examined.

Concurrent and repeated requests require effect-level evidence.
Concurrent and repeated requests require effect-level evidence. Conceptual illustration, not evidence from a customer system.

Check delegated authority and role changes

A user’s authority can change between object creation and execution. Test whether the application evaluates permission at the relevant decision point rather than relying on a role remembered earlier in the workflow. Use controlled role changes agreed with the owner. A user who loses approval authority should not retain it merely because a browser tab or draft request remains open.

Delegation adds another dimension. Define who can act on whose behalf, for which objects, during what period and with what limits. A delegate may be allowed to prepare a request but not approve it, or to approve within one organisational unit only. The test identities should represent those distinctions. One generic administrator account cannot reveal whether delegated boundaries work.

Inspect audit attribution as part of the result. A workflow may correctly permit a delegated action but record only the represented user, hiding who actually acted. Whether that is acceptable depends on the system’s requirements, but it should be visible to the owner. Evidence should distinguish the initiating identity, represented identity and resulting business action where the application supports those concepts.

Investigate concurrency with strict operational limits

Some rules fail only when two authorised test requests reach a decision point close together. A one-use action, balance check or reservation may be evaluated independently before either request commits its effect. Testing this class of behaviour requires explicit permission, bounded request counts and a safe environment. It is not a justification for uncontrolled load generation against production.

Start by discussing the invariant and implementation with the owner. Identify the smallest controlled experiment that can distinguish correct single-effect processing from an unsafe outcome. Use synthetic objects with known initial state and inspect the final authoritative state. Avoid treating timing alone as evidence; the relevant observation is whether the forbidden duplicate or inconsistent effect occurred.

Record uncertainty when a result cannot be reproduced. Concurrency behaviour can depend on infrastructure, queueing and deployment conditions. A single unsuccessful attempt does not prove absence of a race condition. Conversely, an apparent duplicate in a user interface may reflect display caching rather than duplicate processing. The evidence must connect the requests to the underlying business records.

InvariantSafe observation targetImportant limit
One use per tokenAuthoritative usage recordNo real customer token
One fulfillment per orderControlled fulfillment ledgerExternal dispatch disabled
No excess refundSandbox balance and transaction recordsNo real payment processing
One approval outcomeVersioned object and decision eventsBounded concurrent requests only

Distinguish retry handling from authorisation

Idempotency can prevent repeated processing of the same logical operation, but it does not establish that the operation was authorised. A request processed exactly once can still be forbidden. Keep the two properties separate in the matrix: the caller must have permission, and retries must not create unintended additional effects. Test both under the agreed conditions.

Ask how the application identifies the logical operation. A client-supplied key, object identifier or server-generated reference may be involved. Define the expected behaviour when a retry changes significant fields. The system should not silently treat materially different work as the same approved operation merely because a reused reference is present. The intended contract should guide the test.

Also inspect the client’s recovery behaviour after a timeout. The user may not know whether processing completed. A safe workflow should support reconciliation without encouraging repeated irreversible actions. Testing should examine the status lookup or recovery path as well as the original request, with the business owner confirming how ambiguity is resolved.

Cancellation must prevent the prohibited downstream effect, not only change a label.
Cancellation must prevent the prohibited downstream effect, not only change a label. Conceptual illustration, not evidence from a customer system.

Follow asynchronous processing across the trust boundary

Queues, webhooks and background workers can separate the permission decision from the eventual action. Determine which component checks the current state and authority. A frontend denial may not matter if an earlier queued job still executes. A worker may also process stale data after cancellation or role removal. These are architecture questions that should become explicit test rows.

Use correlation identifiers and agreed observation windows. Record when the request was accepted, when the object changed and when the downstream action occurred. If clocks differ, note the discrepancy. Do not conclude that nothing happened simply because the action was not immediate. Equally, do not attribute an unrelated background event to the test without a reliable relationship.

Test recovery paths carefully. A failed job may be retried by an operator or automatically requeued. Ask whether the retry re-evaluates current state and whether it can reuse an obsolete approval. The expected behaviour can vary, but it must be deliberate. Document whether the test covered automatic retries, manual retries or only initial processing.

Compare channels that reach the same business operation

A business operation may be available through the web interface, mobile application, API, administrative console and batch import. These routes can share a service or implement separate checks. Identify the routes that matter and choose representative tests based on the architecture. Do not assume that a secure web interface proves the API or import path enforces the same rule.

Pay attention to older routes retained for compatibility. A new interface may enforce an approval version while a legacy endpoint still accepts an earlier format. The scope should identify supported interfaces and the owner should confirm whether retired routes are actually inaccessible. Testing an unlisted third-party service requires separate permission, even when the main application integrates with it.

When behaviour differs, describe the difference precisely. A finding might state that a specific API transition bypasses the control enforced by the web workflow. It should identify the actor, starting state and effect. Avoid a broad claim that the whole application has no approval controls when the evidence shows a narrower but still important inconsistency.

Capture the story as records, not dramatic narration

A strong business logic finding presents the initial state, authorised test identity, sequence of controlled actions, observed state change and business consequence. Include evidence identifiers for the relevant requests and authoritative records. The reader should be able to distinguish what the tester observed from what the tester inferred. This is more useful than a dramatic narrative about what an attacker might do.

Use synthetic values consistently so engineers can follow the sequence. If the example order is Test-42 at the beginning, preserve that reference through the evidence chain. Record timestamps and relevant object versions. Redact tokens and unnecessary personal information, but do not redact so aggressively that the relationship between actions becomes impossible to understand.

Explain the affected invariant and correction direction. For example, the server may need to validate the current object version and authority atomically at execution. Avoid prescribing a particular implementation without understanding the architecture. The recommendation should state the security property that must hold and the verification that will demonstrate it after correction.

A reviewable event sequence supports a stronger finding than isolated screenshots.
A reviewable event sequence supports a stronger finding than isolated screenshots. Conceptual illustration, not evidence from a customer system.

Worked example: approval after a destination change

Consider a fictional supplier-payment application in a sandbox with settlement disabled. A preparer creates a synthetic payment request to an approved test destination. A separate approver authorises the request. The intended rule is that changing the destination after approval requires renewed approval. The test uses approved identities and controlled destinations, with an owner monitoring the resulting records.

The assessor changes the destination through the application’s permitted edit function and requests execution. If the system executes against the new destination using the old approval, the evidence shows a failure to bind approval to the relevant object version or values. If the system returns the request to pending approval and no execution record appears, that row passes under the tested conditions.

The assessor then checks the agreed related route, such as a batch submission interface, because it reaches the same business operation. The final report names both paths and their outcomes. It does not claim that real money moved, that all payment workflows are affected or that every possible variant was tested. The conclusion remains tied to the controlled evidence.

Retest the invariant and nearby paths

After correction, rerun the original sequence with fresh synthetic objects. Include a permitted control showing that an unchanged approved request can still complete. Then verify that the sensitive change invalidates the approval as intended. Inspect the downstream result so the conclusion does not depend solely on a frontend message. Record the corrected release and environment.

Examine nearby variants justified by the implementation. If several sensitive fields share the same approval binding, test representative changes. If different channels use separate code, include the agreed routes. This is focused regression work, not an unlimited promise to reassess the entire application. Document which variants were selected and why.

Use explicit closure statuses and preserve the original finding. Our retest evidence guide explains how to distinguish corrected, mitigated, partially corrected and unverified results. An accepted business risk is a separate owner decision, not a technical pass. That distinction keeps the remediation record useful over time.

Turn business invariants into repeatable release verification.
Turn business invariants into repeatable release verification. Conceptual illustration, not evidence from a customer system.

Scope a business logic assessment around your real workflows

Bring the application’s important workflows, role model, integrations and test-environment constraints to scoping. Identify actions that move money, grant privileges, release information or trigger external work. Explain the exceptions and recovery procedures as well as the normal path. These inputs help an assessor spend time on meaningful state transitions rather than guessing at intended behaviour.

The OWASP WSTG business logic section includes workflow, timing, integrity and usage-limit testing as relevant areas. The OWASP ASVS can help define application security requirements. This article’s matrix is an original practical planning method; it is not an official certification checklist or a substitute for system-specific analysis.

Use the scoping brief to describe the application and its critical workflows, or contact Atlant Security to agree a focused business logic assessment. The useful deliverable is a set of evidence-backed answers about your actual controls, with enough detail for engineers to correct weaknesses and verify the result.

Published by Atlant Security. Sources, editorial policy and corrections.

PUT THE GUIDANCE TO WORK

Choose your next step.

LET’S START A CONVERSATION

Define the scope.
Take the next step.

Your systems, operating constraints and security objectives. A clear starting point for the test.

Discuss your pentest