For Heads-of · Practitioner

System prompt leakage

The system prompt is extracted or inferred, exposing configuration, guardrail logic, or embedded credentials.

  • medium
  • llm
  • system-prompt
  • owasp-llm

How it happens

An attacker uses direct questioning, indirect probing, or output-pattern analysis to reconstruct all or part of a system prompt that was assumed to be hidden from the user.

Why it matters

A leaked system prompt hands an attacker the guardrail logic to route around, plus any embedded secrets or business logic it wasn't designed to expose.

Mitigating controls

The controls that address this risk, ranked by effectiveness.

Framework and clause references

FrameworkClauseTitle
OWASP Top 10 for LLM ApplicationsLLM08Hidden Context Exposure

Related resources

The external sources behind this risk, from the Resources library.