CWE-1069: Empty Exception Block
An invokable code block contains an exception handling block that does not contain any code, i.e. is empty.
Last updated
Overview
CWE-1069 (Empty Exception Block) is a variant-level software weakness catalogued by MITRE in the Common Weakness Enumeration (CWE). It describes a recurring type of mistake that can lead to exploitable security vulnerabilities.
Common consequences
What can happen when CWE-1069 is exploited.
Reduce Reliability
Affects: Other
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.
How it happens
When it is introduced
Typically introduced during these phases of the software lifecycle.
How to prevent it
Practical mitigations for CWE-1069, grouped by where in the lifecycle they apply.
For every exception block add code that handles the specific exception in the way intended by the application.
Code examples
Illustrative examples from MITRE showing how the weakness appears in code.
In the following Java example, the code catches an ArithmeticException.
Vulnerable example
public class Main {Safe example
public class Main {Terminology & mappings
Mapped taxonomies
- OMG ASCRM (ASCRM-RLB-1)
Frequently asked questions
Common questions about CWE-1069.
- What is CWE-1069?
- An invokable code block contains an exception handling block that does not contain any code, i.e. is empty.
- How do you prevent CWE-1069?
- For every exception block add code that handles the specific exception in the way intended by the application.
- What are the consequences of CWE-1069?
- Exploiting CWE-1069 can lead to: Reduce Reliability.
References
- MITRE CWE definition (CWE-1069) (opens in a new tab)
- CWE-1069 vulnerabilities on NVD (opens in a new tab)
- Learn: What is a CWE?
Weakness data is sourced from the MITRE CWE catalog (v4.20). CVE associations are aggregated and kept current by RadicalNotion.AI.
Stay ahead of CWE-1069
Get alerted the moment a new CWE-1069 vulnerability affects your stack, with AI-written analysis, severity context, and remediation guidance.