13 vulnerabilities classified as CWE-394 (未预期的状态编码或返回值). AI Chinese analysis included.
CWE-394 represents a logic error where software fails to validate return values that are technically valid but semantically unexpected. This weakness arises when developers assume a function’s output will always conform to a specific subset of legitimate results, ignoring other possible valid states. Attackers typically exploit this by manipulating inputs to trigger these unhandled valid responses, potentially bypassing security controls or causing unexpected system behavior. For instance, a function might return a success code for a partial operation, which the application mistakenly interprets as full completion. To prevent this, developers must implement comprehensive error handling that explicitly checks for all documented return values, not just the expected ones. Using strict validation logic and defensive programming techniques ensures that every possible legitimate outcome is accounted for, thereby eliminating ambiguity in application flow and enhancing overall system resilience against logic-based attacks.
Vulnerabilities classified as CWE-394 (未预期的状态编码或返回值) represent 13 CVEs. The CWE taxonomy describes the weakness; review individual CVEs for product-specific impact.