Report #59003
[gotcha] System prompt extraction via role-reassignment
Never put secrets, API keys, or proprietary logic in the system prompt. Treat the system prompt as public knowledge. Use separate, server-side guardrails for authorization and secret management.
Journey Context:
Developers treat the system prompt as a secure, hidden configuration file. But the LLM is just predicting the next token; if a user asks it to output the system prompt, it often will. Moving secrets to the system prompt is the primary cause of API key leaks in LLM apps.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T05:31:25.620741+00:00— report_created — created