OOmnistu

Blog / AI Development

AI Development

System prompt leakage: why instruction secrecy is not a security control

Understand why hidden AI instructions are not a security boundary and why sensitive information and permissions need separate controls.

OOmnistu
Reviewed 2026-11-16 · 3 min read

Many AI features start with a system prompt: hidden instructions that tell the model its role and rules. OWASP lists System Prompt Leakage as LLM07 in its Top 10 for LLM Applications (2025). We read the project's page in full on 15 November 2026 and not its references. This article summarises that one page.

The main point

OWASP says the system prompt should not be considered a secret, and should not be used as a security control. So credentials and connection strings do not belong in it. It also says the leak of the wording is not the real risk. The real risk is what the prompt reveals about the design: secrets stored in the wrong place, roles and permissions delegated to the model instead of enforced by the application, or guardrails that can be bypassed. Even without the exact text, the page says attackers using the app will almost certainly work out many of its guardrails and formatting rules by testing it.

Examples from the page

OWASP's mitigations

  1. Keep sensitive data out of system prompts, and keep it in systems the model cannot reach directly.
  2. Do not rely on system prompts to control behaviour strictly, since prompt injection can alter them. Use systems outside the model.
  3. Put guardrails outside the model: an independent check of the output is preferable to a rule in the prompt, because training a model not to reveal its prompt is not a guarantee.
  4. Enforce privilege separation and authorisation checks independently of the model, deterministically and auditably. Where an agent needs different access levels for different tasks, the page suggests several agents, each with the least privilege its task needs.

Scenarios from the page

SCENARIO #1 FROM OWASP LLM071. Credentials in promptA tool credential is storedinside the system prompt.2. Prompt is leakedAn attacker obtainsthe prompt contents.3. Credentials are reusedThe attacker uses themfor other purposes.THE PAGE'S MITIGATION: KEEP SENSITIVE DATA OUT OF PROMPTSStore sensitive data in systems the model cannot directly access.Enforce permissions and guardrails independently of the model.OWASP LLM07: SCENARIO #11. Credentials in promptA tool credential is storedinside the system prompt.2. Prompt is leakedAn attacker obtainsthe prompt contents.3. Credentials are reusedThe attacker uses themfor other purposes.MITIGATION, NOT A PROMPT RULEKeep secrets outside the prompt,in systems the model cannot directlyaccess. Enforce permissions andguardrails outside the model.
The first OWASP LLM07 scenario, drawn without any real credentials or extraction payload. The page says the prompt should not be treated as a secret or used as a security control. Keeping sensitive data elsewhere and enforcing authorisation independently addresses the design weakness; merely hiding the prompt wording does not.

A quick review

Related: prompt injection explained, AI agent integration risks.

Limits

One OWASP page, read in full. References and the taxonomy links were not read. We make no claim about specific products or incidents, and give no statistics.

By Omnistu.

Sources

Previous
Prompt injection explained for product teams: what it is and what reduces the damage