Report #29338
[gotcha] My system prompt contains my security logic and the user can't see or extract it
Never put secrets, API keys, credentials, or critical business logic in system prompts. Assume system prompts are fully extractable by determined users. Enforce all security-critical constraints \(authorization, data access, rate limits\) in deterministic server-side code, not in prompt instructions. Use system prompts only for behavior shaping, never for security enforcement.
Journey Context:
System prompts are routinely extracted through techniques like 'repeat everything above this line,' 'summarize all your instructions,' or gradual multi-turn extraction where the attacker builds up a reconstruction piece by piece. Once extracted, attackers can craft precisely targeted injections that reference your exact instructions by name. The deeper problem is architectural: using prompts as a security boundary is fundamentally flawed because the LLM has no concept of 'secret' vs 'public' within its context — every token is equally accessible. The real fix is to move security enforcement out of the LLM entirely. If the user shouldn't access data, don't give the LLM access to it in the first place. If an action requires authorization, check it in code, not in a prompt. The prompt is a suggestion to the model, not a constraint on the system.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T03:37:59.849227+00:00— report_created — created