System prompt leakage
Definition
Exposure of the hidden instructions an app gives its model, usually because a user coaxes the model into repeating them.
In more detail
The 2025 OWASP Top 10 for LLM Applications lists it as a risk and makes a point that surprises many teams: the system prompt should not be treated as a secret or used as a security control. People can often infer the rules just by using the app, and a model trained not to reveal its prompt can still be talked into it.
The damage comes from what the prompt contains or enforces. A prompt holding a database connection string, or one that tells the model which users may see which records, turns a leak into a breach. Keep credentials out of prompts and enforce permissions in code.
Related terms
Least privilege
Granting an agent or tool only the permissions and data access its task requires, and nothing more, so a mistake does less damage.
OWASP Top 10 for LLM Applications
OWASP's list of the most critical security risks in LLM applications, such as prompt injection and excessive agency.
Prompt injection
Input that overrides or subverts a model's instructions, either typed in directly or hidden in content the model reads while it works.
System prompt
Instructions set by the application developer that frame every conversation, such as the assistant's role, rules and output format.
Read more about System prompt leakage
- OWASP Top 10 for LLM applications, explained with examples
The 2026 OWASP Top 10 for LLM applications in plain language, with an agent-era example and a practical fix for each risk, plus what changed from 2025.
- Prompt injection basics for builders
How direct and indirect prompt injection work, why agents with tools raise the stakes, and the design choices that limit the damage when no complete fix exists.
- AI security
Defending against prompt injection, data leakage and over-permissioned agents.