This weakness occurs when software fails to properly anticipate and handle rare or unexpected runtime situations that fall outside normal operation.
Developers often write code assuming certain problematic events—like memory exhaustion, permission denials, or malformed data from external sources—simply won't happen. However, attackers actively seek to trigger these exact conditions to break those assumptions, leading to crashes, incorrect outputs, or security breaches. While this includes improper exception handling, the core issue is broader: it's about any missing or inadequate validation for edge cases. Proactively identifying and managing these unusual states is crucial for building resilient software that can withstand hostile environments, not just ideal ones.
Impact: DoS: Crash, Exit, or RestartUnexpected State
The data which were produced as a result of a function call could be in a bad state upon return. If the return value is not checked, then this bad data may be used in operations, possibly leading to a crash or other unintended behaviors.
Strategy: Language Selection
Effectiveness: High
Effectiveness: High
Strategy: Input Validation
ccc#javajavajavajavac#c
/*routine that ensures user_supplied_addr is in the right format for conversion /
cc++c++java
// create readFile File object from string containing name of file* }
java
javajava
// create readFile File object from string containing name of file* }
java
javaMedium