System prompt leakage means a user discovers the hidden instructions that configure an LLM application. Assume those instructions can eventually be extracted.
Models are built to follow text instructions, not to protect secrets. Attackers can retry, rephrase, and compare outputs until parts of a prompt appear.
Two risks follow:
Direct risk: any API key, password, customer data, or private rule stored in the prompt may be exposed.
Indirect risk: leaked safety rules help attackers design better bypasses.
Treat the prompt as configuration, not as a secret store. Keep authorization and business rules in backend code. Store credentials in a vault and reveal them only to trusted tool code. Output filters can catch copied prompt text, but the safe design makes a leaked prompt low impact.
Rewriting in plainer words…
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.