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.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.Error messages with prompts are harder to parse for debugging
- C.Long error messages exceed HTTP header size limits