Report #54880
[gotcha] System prompt contents are hidden from users and safe for secrets
Never embed secrets, API keys, credentials, or proprietary business logic in system prompts. Assume the full system prompt will eventually be extracted and made public. Move all credentials and sensitive logic to server-side middleware outside the LLM context.
Journey Context:
System prompts are routinely extracted through various techniques: asking the model to repeat its instructions, encoding tricks, roleplay scenarios, or exploiting the model's tendency to comply with requests to 'show your instructions.' Even with guardrails, new extraction techniques emerge regularly. The fundamental issue is that the system prompt exists in the same context as user input — there is no hardware-level isolation. Developers treat system prompts like server-side environment variables, but they are actually client-side code: visible to anyone who looks hard enough. Putting API keys in a system prompt is equivalent to putting them in client-side JavaScript. This is OWASP LLM07 \(System Prompt Information Disclosure\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T22:36:44.416569+00:00— report_created — created