Workflow and State Bypass

A business logic flaw where a multi-step process (verify, pay, approve, upgrade) is enforced only by the order the UI presents steps in, so a later step can be reached without the earlier ones, or the state machine can be pushed into a combination it was never meant to allow.

How it works

Every multi-step flow is a state machine with invariants: payment before fulfilment, mailbox ownership before verified, eligibility before extension, role X before destructive action Y. These bugs happen when the server checks the current request but not the current state:

FailureWhat breaksExample
Step skippingLater endpoints don’t check that earlier steps completedAuthenticated pages reachable after password entry without completing 2FA (7 ways of bypassing 2FA); payment step skipped through redirect parameters (Common Bug Bounty Vulnerabilities)
Proof-of-step leaksThe secret meant to prove a step is already in the client’s handsThe registration response returned the same JWT the email-verification link used, so the mailbox never had to be read (Email verification bypass)
Eligibility not re-checkedThe server honours a request without re-validating business preconditionsA payment extension was accepted for another account with no outstanding balance (Payment extension API)
Mid-flow mutationAn input that binds the flow can change after a step is issuedEmail on a login flow changed after the OTP was issued, then raced with OTP verification, giving ATO (Race condition auth bypass)
Cross-surface desyncTwo apps share state but enforce rules differentlyA Moderator deleted an org group from the todo subdomain, and the deletion cascaded to account, where only Admin or Owner could delete (Data deletion via subdomain sync)
Alternate pathA second route reaches the same state change without the first route’s checksInternal transfers that bypass withdrawal limits, and deposits that become spendable too early (Bitvulnex)

Testing heuristics

  • Write the flow down as states and transitions, then ask for each transition: which earlier state does the server actually check? One hunter’s model: sign up (partial) → change email (verification pending) → upgrade plan (payment processing) → verify email → use premium features. Ask where permissions desync along that chain (Backend Mastery).
  • Target the implicit beliefs: “this only happens once”, “this state can’t change mid-request”, “this user already passed step N” (Backend Mastery).
  • Compare every token or identifier a step issues with what the previous response already returned (Email verification bypass).
  • Repeat each action from every role and on every surface: web, API, mobile and sibling subdomains that share a database. Read the developer documentation for the stated role matrix and test against it (Data deletion via subdomain sync).
  • Combine with concurrency: step checks that run in separate threads or transactions are Race Conditions candidates (Race condition auth bypass).
  • API checklists put state transitions next to trust boundaries as the core of a logic-focused pentest (API pentest checklist). “Skip payment step” is a standard checklist item (Bug Bounty Hunting in 2026).
  • Verify that the state actually changed. A 200 with a confirmation number is not proof the change persisted (Payment extension API).

Notable cases

Defenses

  • Keep flow state on the server and check it on every transition. Never infer it from which endpoint the client called. Use step tokens (an HMAC over flow state) and idempotency keys for high-value flows (OWASP API Top 10 guide with tests).
  • Use separate, single-purpose tokens for each step (session vs. email verification vs. reset), delivered only over the channel the step is proving.
  • Re-validate ownership and business eligibility against authoritative records when the action is committed (Payment extension API).
  • Lock flow-binding attributes (email, account, amount) once a step is issued, and invalidate the flow if they change.
  • Enforce the same role matrix on every surface that shares the data.

Sources