The product supports a session in which more than one behavior must be performed by an actor, but it does not properly ensure that the actor performs the behaviors in the required sequence.

By performing actions in an unexpected order, or by omitting steps, an attacker could manipulate the business logic of the product or cause it to enter an invalid state. In some cases, this can also expose resultant weaknesses.
For example, a file-sharing protocol might require that an actor perform separate steps to provide a username, then a password, before being able to transfer files. If the file-sharing server accepts a password command followed by a transfer command, without any username being provided, the product might still perform the transfer.
Note that this is different than CWE-696, which focuses on when the product performs actions in the wrong sequence; this entry is closely related, but it is focused on ensuring that the actor performs actions in the correct sequence.
Workflow-related behaviors include:

Steps are performed in the expected order.
Required steps are not omitted.
Steps are not interrupted.
Steps are performed in a timely fashion.

Primary

Resultant

Implementation
REALIZATION: This weakness is caused during implementation of an architectural security tactic.

Other
Alter Execution Logic
An attacker could cause the product to skip critical steps or perform them in the wrong order, bypassing its intended business logic. This can sometimes have security implications.

Automated Static Analysis
Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)

This code is part of an FTP server and deals with various commands that could be sent by a user. It is intended that a user must successfully login before performing any other action such as retrieving or listing files.

def dispatchCommand(command, user, args):
if command == 'Login':loginUser(args)return

# user has requested a file
if command == 'Retrieve_file':

if authenticated(user) and ownsFile(user,args):

sendFile(args)return

if command == 'List_files':listFiles(args)return

...

The server correctly avoids sending files to a user that isn't logged in and doesn't own the file. However, the server will incorrectly list the files in any directory without confirming the command came from an authenticated user, and that the user is authorized to see the directory's contents.
Here is a fixed version of the above example:

def dispatchCommand(command, user, args):

...
if command == 'List_files':if authenticated(user) and ownsDirectory(user,args):listFiles(args)return

...

CVE-2011-0348
Bypass of access/billing restrictions by sending traffic to an unrestricted destination before sending to a restricted destination.
https://www.cve.org/CVERecord?id=CVE-2011-0348

CVE-2007-3012
Attacker can access portions of a restricted page by canceling out of a dialog.
https://www.cve.org/CVERecord?id=CVE-2007-3012

CVE-2009-5056
Ticket-tracking system does not enforce a permission setting.
https://www.cve.org/CVERecord?id=CVE-2009-5056

CVE-2004-2164
Shopping cart does not close a database connection when user restores a previous order, leading to connection exhaustion.
https://www.cve.org/CVERecord?id=CVE-2004-2164

CVE-2003-0777
Chain: product does not properly handle dropped connections, leading to missing NULL terminator (CWE-170) and segmentation fault.
https://www.cve.org/CVERecord?id=CVE-2003-0777

CVE-2005-3327
Chain: Authentication bypass by skipping the first startup step as required by the protocol.
https://www.cve.org/CVERecord?id=CVE-2005-3327

CVE-2004-0829
Chain: File server crashes when sent a "find next" request without an initial "find first."
https://www.cve.org/CVERecord?id=CVE-2004-0829

CVE-2010-2620
FTP server allows remote attackers to bypass authentication by sending (1) LIST, (2) RETR, (3) STOR, or other commands without performing the required login steps first.
https://www.cve.org/CVERecord?id=CVE-2010-2620

CVE-2005-3296
FTP server allows remote attackers to list arbitrary directories as root by running the LIST command before logging in.
https://www.cve.org/CVERecord?id=CVE-2005-3296

40
Insufficient Process Validation

Allowed
This CWE entry is at the Base level of abstraction, which is a preferred level of abstraction for mapping to the root causes of vulnerabilities.
Carefully read both the name and description to ensure that this mapping is an appropriate fit. Do not try to 'force' a mapping to a lower-level Base/Variant simply to comply with this preferred level of abstraction.

This weakness is typically associated with business logic flaws, except when it produces resultant weaknesses.
The classification of business logic flaws has been under-studied, although exploitation of business flaws frequently happens in real-world systems, and many applied vulnerability researchers investigate them. The greatest focus is in web applications. There is debate within the community about whether these problems represent particularly new concepts, or if they are variations of well-known principles.
Many business logic flaws appear to be oriented toward business processes, application flows, and sequences of behaviors, which are not as well-represented in CWE as weaknesses related to input validation, memory management, etc.

CWE Content Team
MITRE
2011-03-24
1.12
2011-03-30

CWE Content Team
MITRE
2011-06-01
updated Common_Consequences

CWE Content Team
MITRE
2011-06-27
updated Common_Consequences, Observed_Examples, Related_Attack_Patterns, Relationships

CWE Content Team
MITRE
2012-05-11
updated Demonstrative_Examples, Observed_Examples, Relationships

CWE Content Team
MITRE
2017-11-08
updated Modes_of_Introduction, References, Relationships

CWE Content Team
MITRE
2020-02-24
updated Relationships

CWE Content Team
MITRE
2021-10-28
updated Relationships

CWE Content Team
MITRE
2022-04-28
updated Demonstrative_Examples

CWE Content Team
MITRE
2023-01-31
updated Common_Consequences, Description

CWE Content Team
MITRE
2023-04-27
updated References, Relationships

CWE Content Team
MITRE
2023-06-29
updated Mapping_Notes

CWE Content Team
MITRE
2025-12-11
4.19
2025-12-11
updated Applicable_Platforms, Detection_Factors, Relationships, Type, Weakness_Ordinalities

Anonymous External Contributor
2021-11-11
Reported an error in a demonstrative example