CWE-841: Improper Enforcement of Behavioral Workflow (Base)

Description: 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.

Extended Description: 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.




Modes of Introduction: ::PHASE:Implementation:NOTE:REALIZATION: This weakness is caused during implementation of an architectural security tactic.::



Common Consequences: ::SCOPE:Other:IMPACT:Alter Execution Logic:NOTE: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.::



Observed Examples: ::REFERENCE:CVE-2011-0348:DESCRIPTION:Bypass of access/billing restrictions by sending traffic to an unrestricted destination before sending to a restricted destination.:LINK:https://www.cve.org/CVERecord?id=CVE-2011-0348::REFERENCE:CVE-2007-3012:DESCRIPTION:Attacker can access portions of a restricted page by canceling out of a dialog.:LINK:https://www.cve.org/CVERecord?id=CVE-2007-3012::REFERENCE:CVE-2009-5056:DESCRIPTION:Ticket-tracking system does not enforce a permission setting.:LINK:https://www.cve.org/CVERecord?id=CVE-2009-5056::REFERENCE:CVE-2004-2164:DESCRIPTION:Shopping cart does not close a database connection when user restores a previous order, leading to connection exhaustion.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-2164::REFERENCE:CVE-2003-0777:DESCRIPTION:Chain: product does not properly handle dropped connections, leading to missing NULL terminator (CWE-170) and segmentation fault.:LINK:https://www.cve.org/CVERecord?id=CVE-2003-0777::REFERENCE:CVE-2005-3327:DESCRIPTION:Chain: Authentication bypass by skipping the first startup step as required by the protocol.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-3327::REFERENCE:CVE-2004-0829:DESCRIPTION:Chain: File server crashes when sent a find next request without an initial find first.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-0829::REFERENCE:CVE-2010-2620:DESCRIPTION: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.:LINK:https://www.cve.org/CVERecord?id=CVE-2010-2620::REFERENCE:CVE-2005-3296:DESCRIPTION:FTP server allows remote attackers to list arbitrary directories as root by running the LIST command before logging in.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-3296::



Notes: ::TYPE:Research Gap:NOTE: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.::