CWE-1069: Empty Exception Block

Export to Word

Description

An invokable code block contains an exception handling block that does not contain any code, i.e. is empty.

Extended Description

When an exception handling block (such as a Catch and Finally block) is used, but that block is empty, this can prevent the product from running reliably. If the relevant code is reachable by an attacker, then this reliability problem might introduce a vulnerability.


ThreatScore

Threat Mapped score: 0.0

Industry: Finiancial

Threat priority: Unclassified


Observed Examples (CVEs)

Related Attack Patterns (CAPEC)

N/A


Attack TTPs

N/A

Modes of Introduction

Phase Note
None listed.

Common Consequences

Potential Mitigations

Applicable Platforms


Demonstrative Examples

Intro: In the following Java example, the code catches an ArithmeticException.

Body: Since the exception block is empty, no action is taken.

public class Main { public static void main(String[] args) { int a = 1; int b = 0; int c = 0; try { c = a / b; } catch(ArithmeticException ae) { } } }

Notes

← Back to CWE list