CWE-390: Detection of Error Condition Without Action
CWE版本: 4.18
更新日期: 2025-09-09
弱点描述
The product detects a specific error, but takes no actions to handle the error.
常见后果
影响范围: Integrity Other
技术影响: Varies by Context Unexpected State Alter Execution Logic
说明: An attacker could utilize an ignored error condition to place the system in an unexpected state that could lead to the execution of unintended logic and could cause other unintended behavior.
潜在缓解措施
阶段: Implementation
描述: Properly handle each exception. This is the recommended solution. Ensure that all exceptions are handled in such a way that you can be sure of the state of your system at any given moment.
阶段: Implementation
描述: If a function returns an error, it is important to either fix the problem and try again, alert the user that an error has happened and let the program continue, or alert the user and close and cleanup the program.
阶段: Testing
描述: Subject the product to extensive testing to discover some of the possible instances of where/how errors or return values are not handled. Consider testing techniques such as ad hoc, equivalence partitioning, robustness and fault tolerance, mutation, and fuzzing.
检测方法
方法: 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.)
有效性: High
观察示例
参考: CVE-2022-21820
A GPU data center manager detects an error due to a malformed request but does not act on it, leading to memory corruption.
引入模式
| 阶段 | 说明 |
|---|---|
| Implementation | REALIZATION: This weakness is caused during implementation of an architectural security tactic. |
适用平台
编程语言
分类映射
| 分类名称 | 条目ID | 条目名称 | 映射适配度 |
|---|---|---|---|
| CLASP | - | Improper error handling | - |
| The CERT Oracle Secure Coding Standard for Java (2011) | ERR00-J | Do not suppress or ignore checked exceptions | - |
| Software Fault Patterns | SFP4 | Unchecked Status Condition | - |