Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CWE-394 (未预期的状态编码或返回值) — Vulnerability Class 13

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.

MITRE CWE Description
The product does not properly check when a function or operation returns a value that is legitimate for the function, but is not expected by the product.
Common Consequences (1)
Integrity, OtherUnexpected State, Alter Execution Logic

Vulnerabilities classified as CWE-394 (未预期的状态编码或返回值) represent 13 CVEs. The CWE taxonomy describes the weakness; review individual CVEs for product-specific impact.