---
title: "CWE-841: Improper Enforcement of Behavioral Workflow"
url: https://radicalnotion.ai/cwe/cwe-841
type: cwe
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 or timeframe."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-841: Improper Enforcement of Behavioral Workflow

- **Abstraction:** Class
- **Structure:** Simple
- **Status:** Incomplete
- **CVEs with this as primary weakness:** 107
- **Of those, in CISA KEV:** 1
- **New in 2026:** 62
- **CWE catalog version:** 4.21

## 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 or timeframe.

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 | Note |
| --- | --- |
| Implementation | REALIZATION: This weakness is caused during implementation of an architectural security tactic. |

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Other | Alter Execution Logic, Unexpected State | 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 with security implications. |

## Detection methods

### 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.)

## Demonstrative examples

### Example 1

Consider a file-sharing protocol that 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.

### Example 2

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.

Bad code:

```python
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

    ...
```

Good code:

```python
def dispatchCommand(command, user, args):

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

    ...
```

## Observed examples

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

## Real CVEs with this weakness (sample of 12 of 107)

| CVE | Title | Severity | CVSS | EPSS | CISA KEV | Published |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2026-67279 | SSH Pre-Authentication Rekey State Bypass in MikroTik RouterOS | medium | 6.9 | - | Yes | 2026-09-05 |
| CVE-2026-3130 | - | critical | 9.8 | - | No | 2026-03-03 |
| CVE-2023-4181 | SourceCodester Free Hospital Management System for Small Practices Redirect behavioral workflow | critical | 9.8 | - | No | 2023-08-06 |
| CVE-2020-9850 | watchOS: WebKit - A remote attacker may be able to cause arbitrary code execution | critical | 9.8 | - | No | 2020-06-09 |
| CVE-2022-2102 | Secheron SEPCOS Control and Protection Relay | critical | 9.4 | - | No | 2022-06-24 |
| CVE-2022-2105 | Secheron SEPCOS Control and Protection Relay | critical | 9.4 | - | No | 2022-06-24 |
| CVE-2026-113165 | Inappropriate implementation in Core | high | 8.8 | - | No | 2026-10-20 |
| CVE-2026-113308 | Inappropriate implementation in Core | high | 8.8 | - | No | 2026-10-20 |
| CVE-2026-113094 | Inappropriate implementation in API | high | 8.8 | - | No | 2026-10-20 |
| CVE-2026-104626 | Gitea fork workflow job revival through later approval | high | 8.8 | - | No | 2026-10-06 |
| CVE-2026-95369 | Inappropriate implementation in XML | high | 8.8 | - | No | 2026-09-29 |
| CVE-2026-65126 | - | high | 8.8 | - | No | 2026-09-22 |

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-691](https://radicalnotion.ai/cwe/cwe-691) | Insufficient Control Flow Management |
| Child | [CWE-1476](https://radicalnotion.ai/cwe/cwe-1476) | Improper Request Propagation before Data Reception in Write Transactions in a Bus Architecture |

## Taxonomy mappings

| Taxonomy | Entry | Id | Fit |
| --- | --- | --- | --- |
| WASC | Insufficient Process Validation | 40 | - |

## Frequently asked questions

### What is CWE-841?

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 or timeframe.

### What CVEs are caused by CWE-841?

107 recorded CVEs are attributed to CWE-841, including CVE-2026-67279, CVE-2026-3130 and CVE-2023-4181. 1 is listed in CISA's Known Exploited Vulnerabilities (KEV) catalog.

### How is CWE-841 detected?

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.)

### What are the consequences of CWE-841?

Exploiting CWE-841 can lead to: Alter Execution Logic, Unexpected State.

### Is CWE-841 actively exploited?

Yes. 1 CWE-841 vulnerability is in CISA's KEV catalog of actively exploited flaws, out of 107 recorded CVEs.

Primary source: [MITRE CWE](https://cwe.mitre.org/data/definitions/841.html)

---

Source: [RadicalNotion.AI](https://radicalnotion.ai/cwe/cwe-841). Licensed CC BY-NC 4.0; attribute RadicalNotion.AI and link the source page when you reuse this data.
