Course contentsShow
← Security
Lesson 938 of 3,05219. Web Security - Business Logic VulnerabilitiesFree lesson

Testing State and Workflow Violations

Manipulating request sequences, skipping steps, and forcing invalid state transitions to break intended business flows.

Testing State and Workflow Violations

You'll learn: How to systematically test whether an application properly enforces the correct order and validity of state transitions in business workflows.

What Is State and Workflow Violation Testing?

Now that you've mapped business workflows (lesson 937), it's time to actively test them. State and workflow violation testing means deliberately attempting to manipulate request sequences, skip mandatory steps, or force invalid state transitions to see if the application breaks its intended business logic.

Think of it like trying to board an airplane without going through security first, or attempting to withdraw money from a bank account before it's been opened. A secure application should reject these out-of-order operations.

Core Testing Techniques

Step Skipping: Try accessing later workflow steps directly without completing earlier ones. For example, jump straight to the "confirm payment" page without adding items to your cart or providing shipping information.

Sequence Manipulation: Complete steps in the wrong order. Submit payment before selecting products, or confirm an order before entering delivery details.

State Forcing: Manipulate parameters or session data to claim you're in a different workflow state than you actually are. Change a status=pending to status=approved in your requests.

Invalid Transitions: Attempt transitions that shouldn't be allowed by business rules—like canceling an already-shipped order, or re-using a one-time verification token.

Testing Approach

Send requests with modified state indicators, bookmarked URLs from later workflow stages, or replayed requests from completed processes. Monitor whether the application validates the current state before allowing the action, or blindly trusts client-supplied state information.

Key Takeaway: Testing state violations means systematically attempting to break workflow sequences by skipping steps, reversing order, or forcing invalid transitions—exposing applications that trust clients to maintain valid state.