CWE-670Always-Incorrect Control Flow Implementation

PUBLISHEDweakness record
released 2008-04-11 · last modified 2025-12-11

Metadata

CWE ID:
CWE-670
摘要:
Class
结构:
Simple
状态:
Draft
发布日期:
2008-04-11
更新日期:
2025-12-11

名称

Always-Incorrect Control Flow Implementation

描述

The code contains a control flow path that does not reflect the algorithm that the path is intended to implement, leading to incorrect behavior any time this path is navigated.

This weakness captures cases in which a particular code segment is always incorrect with respect to the algorithm that it is implementing. For example, if a C programmer intends to include multiple statements in a single block but does not include the enclosing braces (CWE-483), then the logic is always incorrect. This issue is in contrast to most weaknesses in which the code usually behaves correctly, except when it is externally manipulated in malicious ways.

常见后果

范围:
Other
影响:
Other, Alter Execution Logic

相关 CWE