They should test whether the model can be induced to reveal instructions, credentials, or internal rules, and whether those items are present in prompts at all. If a prompt disclosure would expose anything sensitive, the control is failing. Success means the model can be probed without revealing secrets or authorisation logic.
Why This Matters for Security Teams
prompt leakage is not a cosmetic issue. If an AI system can be manipulated into exposing system prompts, internal policy text, tool instructions, or embedded secrets, an attacker may learn how to bypass guardrails, imitate trusted workflows, or harvest credentials for later abuse. That makes leakage testing a control verification problem, not a language-quality problem.
Security teams also need to distinguish between harmless prompt content and material that creates operational risk. A prompt that contains role instructions is less serious than one that includes API keys, access tokens, tenant identifiers, or escalation logic. The question is whether sensitive information can be elicited through normal use, adversarial prompting, or indirect instruction injection. Guidance from NIST SP 800-53 Rev 5 Security and Privacy Controls is useful here because it frames protection as an ongoing control objective, not a one-time hardening exercise.
In practice, many security teams encounter prompt leakage only after users, testers, or attackers have already exposed the sensitive content through routine probing rather than through intentional review.
How It Works in Practice
Effective testing starts by inventorying what the prompt or orchestration layer can reveal. That includes system instructions, hidden messages, policy fragments, chain-of-thought-like reasoning artifacts, tool schemas, retrieval snippets, and any secrets accidentally placed in context. Security teams should then test the model and surrounding application with structured probes that attempt to elicit those items through direct requests, role-play, obfuscation, multi-turn manipulation, and prompt injection. The objective is not just to see whether the model resists one bad prompt, but whether the full control stack prevents disclosure across realistic paths.
A practical evaluation usually combines four checks:
- Red-team prompts that try to extract hidden instructions, secrets, and authorization logic.
- Configuration review to confirm sensitive data is not being inserted into prompts in the first place.
- Output filtering and policy enforcement to stop accidental disclosure before it reaches the user.
- Logging and alerting so repeated extraction attempts are visible to SOC or platform owners.
This is where AI-specific threat intelligence matters. The Anthropic first AI-orchestrated cyber espionage campaign report is a reminder that attackers will use AI systems for automation, reconnaissance, and deception, which makes prompt disclosure a real operational concern. For teams applying model-risk controls, NIST AI Risk Management Framework is a useful structure for mapping testing, monitoring, and governance responsibilities.
Teams should also validate the surrounding application path, because prompt leakage often appears through retrieval, tool use, or logging rather than from the model core itself. These controls tend to break down when sensitive instructions are stored in long-lived conversation memory or injected dynamically from poorly governed upstream systems, because the model becomes only one part of the disclosure path.
Common Variations and Edge Cases
Tighter prompt controls often increase operational overhead, requiring organisations to balance leakage resistance against debugging visibility, developer productivity, and supportability. There is no universal standard for how much internal instruction detail should be hidden from operators, so best practice is evolving around risk-based segmentation rather than absolute secrecy.
One common edge case is that some environments deliberately expose partial instructions to aid customer support or regulated explanations. In those cases, the control objective is not total concealment but controlled disclosure, where only approved content is reachable and all sensitive fields are excluded. Another edge case involves retrieval-augmented generation, where the prompt itself may be clean but the retrieved document contains data that should never have been available to the model. In that scenario, leakage testing has to cover the retrieval layer, document classification, and access control, not just the prompt text.
Prompt leakage controls also behave differently in agentic systems. If an AI agent can call tools, the risk includes tool names, arguments, credentials, and workflow logic, which can be exposed through conversation abuse or error handling. Current guidance suggests testing those systems as an end-to-end control plane, not as isolated model prompts. Where organisations handle high-assurance workflows, the question becomes whether prompt contents are already treated as sensitive assets with the same discipline applied to secrets management and privileged access governance.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Agentic AI Top 10 and MITRE ATLAS address the attack and risk surface, while NIST AI RMF, NIST CSF 2.0 and NIST AI 600-1 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| NIST AI RMF | Prompt leakage testing is part of governing and measuring AI system risk. | |
| OWASP Agentic AI Top 10 | Agent and prompt abuse commonly drive disclosure of hidden instructions and secrets. | |
| NIST CSF 2.0 | PR.DS | Prompt content protection aligns with safeguarding sensitive data from exposure. |
| NIST AI 600-1 | GenAI-specific profiling addresses output control, misuse, and disclosure risk. | |
| MITRE ATLAS | AML.TA0001 | Prompt leakage often follows adversarial probing and manipulation techniques. |
Set explicit risk owners, testing criteria, and monitoring for disclosure behavior across the AI lifecycle.
Related resources from NHI Mgmt Group
Deepen Your Knowledge
Reviewed and updated by the NHIMG editorial team on August 2, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org