This weakness occurs when a try-catch or try-finally block is present but contains no code to handle the caught exception or perform cleanup.
Empty exception blocks silently swallow errors, making debugging extremely difficult. The program appears to run normally, but underlying failures—like a failed database connection or a corrupted file read—go unreported, leading to unpredictable behavior and corrupted data states. From a security perspective, this reliability flaw can become a vulnerability if an attacker can trigger the exception. By suppressing critical error messages, empty catch blocks can hide the symptoms of an ongoing attack, such as authentication bypass attempts or injection attacks, allowing malicious activity to continue undetected.
Impact: Reduce Reliability
javajava