During a security review of an LLM-powered application, a researcher discovers that when certain malformed inputs cause the model API to return an error, the application's error handler passes the full API request body (including the system prompt and conversation history) back to the user as a JSON error response.
A company's LLM application returns verbose error messages that include the full prompt context when the model fails. A security researcher reports this as a vulnerability. Why is this a valid finding?
- A.B. Full prompt context in error messages may expose the system prompt (containing business logic and potentially credentials), user conversation history (PII), and tool configurations to anyone who can trigger an error
- B.A. Verbose error messages increase server load
- C.C. Error messages with prompts are harder to parse for debugging
- D.D. Long error messages exceed HTTP header size limits
Why A is correct
Verbose error disclosure is a classic information disclosure vulnerability applied to LLM apps. If a model API call fails and the application returns the full request context in the error response, it exposes: (1) the system prompt (operator business logic, potential credentials, tool configuration), (2) the conversation history (user PII, sensitive queries), (3) internal tooling details. Attackers can deliberately trigger errors to extract this information. Fix: return sanitized error messages to clients; log full context server-side with access controls. This is analogous to OWASP A09:2021 Security Logging and Monitoring Failures.
Know someone studying for AI Security Fundamentals? Send them this one.