CWE-1069 Variant Incomplete

Empty Exception Block

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.

Definition

What is CWE-1069?

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.
Auswirkungen in der Praxis

Real-world CVEs caused by CWE-1069

Bisher sind in MITREs Katalog keine öffentlichen CVE-Referenzen mit dieser CWE verknüpft.

Wie Angreifer es ausnutzen

Angreiferpfad Schritt für Schritt

  1. 1

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

  2. 2

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

  3. 3

    In the code below the exception has been logged and the bad execution has been handled in the desired way allowing the program to continue in an expected way.

Verwundbares Codebeispiel

Vulnerable Java

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

Verwundbar Java
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) { 
  		}
  	}
  }
Sicheres Codebeispiel

Secure Java

In the code below the exception has been logged and the bad execution has been handled in the desired way allowing the program to continue in an expected way.

Sicher Java
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) { 
  			log.error("Divided by zero detected, setting to -1."); 
  			c = -1;
  		}
  	}
  }
What changed: the unsafe sink is replaced (or the input is validated/escaped) so the same payload no longer triggers the weakness.
Präventions-Checkliste

How to prevent CWE-1069

  • Implementation For every exception block add code that handles the specific exception in the way intended by the application.
Erkennungssignale

How to detect CWE-1069

SAST High

Führe statische Analyse (SAST) auf der Codebasis aus und suche im Datenfluss nach dem unsicheren Muster.

DAST Moderate

Führe dynamische Application-Security-Tests gegen den Live-Endpoint aus.

Runtime Moderate

Beobachte Runtime-Logs auf ungewöhnliche Exception-Traces, fehlerhafte Eingaben oder Versuche, Autorisierung zu umgehen.

Code review Moderate

Code Review: Markiere jeden neuen Code, der Eingaben von dieser Oberfläche ohne validierte Framework-Helper verarbeitet.

Plexicus Auto-Fix

Plexicus erkennt CWE-1069 automatisch und öffnet in unter 60 Sekunden einen Fix-PR.

Codex Remedium scannt jeden Commit, identifiziert genau diese Schwachstelle und liefert einen reviewer-ready Pull Request mit dem Patch. Keine Tickets. Keine Hand-offs.

Häufig gestellte Fragen

Frequently asked questions

Was ist CWE-1069?

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.

Wie gravierend ist CWE-1069?

MITRE hat für diese Schwachstelle keine Exploit-Wahrscheinlichkeit veröffentlicht. Behandle sie als mittlere Auswirkung, bis dein Threat Model anderes belegt.

Welche Sprachen oder Plattformen sind von CWE-1069 betroffen?

MITRE hat für diese CWE keine betroffenen Plattformen spezifiziert — sie kann in den meisten Anwendungs-Stacks auftreten.

Wie kann ich CWE-1069 verhindern?

For every exception block add code that handles the specific exception in the way intended by the application.

Wie erkennt und behebt Plexicus CWE-1069?

Die SAST-Engine von Plexicus erkennt die Datenfluss-Signatur von CWE-1069 bei jedem Commit. Bei einem Treffer öffnet unser Codex-Remedium-Agent einen Fix-PR mit korrigiertem Code, Tests und einer einzeiligen Zusammenfassung für den Reviewer.

Wo erfahre ich mehr über CWE-1069?

MITRE veröffentlicht die kanonische Definition unter https://cwe.mitre.org/data/definitions/1069.html. Für ergänzende Hinweise kannst du auch die OWASP- und NIST-Dokumentation heranziehen.

Bereit, wenn du es bist

Schluss mit dem Bezahlen pro Entwickler.
Schließ den Kreislauf.

Plexicus ist die KI-native ASPM, die scannt, filtert, fixt, pentestet und erklärt — autonom. Unbegrenzte Entwickler, unbegrenzte Repos, Fair-Use-KI-Aktionen. Echter kostenloser Tarif, €269/mo jährlich, wenn du bereit bist.