LLM09:2023 - Improper Error Handling

Description:
Improper error handling occurs when error messages or debugging information are exposed in a way that could reveal sensitive information, system details, or potential attack vectors to an attacker.

Common Improper Error Handling Issues:

How to Prevent:

Example Attack Scenarios: Scenario #1: An attacker exploits an LLM’s error messages to gather sensitive information or system details, enabling them to launch a targeted attack or exploit known vulnerabilities.

Scenario #2: A developer accidentally leaves debugging information exposed in production, allowing an attacker to identify potential attack vectors or vulnerabilities in the system.

By implementing proper error handling mechanisms and ensuring that error messages do not reveal sensitive information, developers can reduce the risk of attackers exploiting LLM vulnerabilities and improve system stability.