Treat the model as an untrusted decision surface and add controls around what it can access, retrieve, and return. Use least privilege, strong data classification, output filtering, prompt-injection defenses, and continuous monitoring for abnormal retrieval or disclosure patterns. The goal is to reduce both accidental leakage and deliberate theft before sensitive data reaches a user or downstream system.
Why This Matters for Security Teams
AI applications do not need to be “hacked” in the classic sense to leak data. If a model can retrieve sensitive records, read internal prompts, or call tools with broad permissions, an attacker can steer it into disclosing information through prompt injection, tool abuse, or over-broad retrieval. The control problem is therefore not whether the model sounds trustworthy, but whether the surrounding application limits what it can touch and return.
This is why guidance from NIST Cybersecurity Framework 2.0 remains useful, even though AI changes the attack surface: security teams still need asset visibility, access control, monitoring, and response. NHIMG research on the State of Secrets in AppSec shows that secret sprawl and weak visibility are persistent issues, which becomes more dangerous when AI systems can search, summarise, and route data at machine speed. In practice, many security teams discover leakage only after a model has already exposed data through a benign-looking answer or downstream integration.
How It Works in Practice
Preventing exfiltration starts by treating the model as an untrusted decision surface. Security teams should design the AI application so the model never gets unrestricted access to sensitive stores, raw credentials, or entire conversation histories. Instead, grant only task-specific access, narrow the retrieval scope, and place policy checks between the model and any data source or outbound channel. That means the application, not the model, decides whether a given record can be fetched, summarised, or returned.
In practice, that usually means layering several controls:
- Classify data before it enters prompts or retrieval indexes, and block high-risk classes unless a business justification exists.
- Use least privilege for tools, APIs, and vector stores so the model only reaches the data it genuinely needs.
- Apply output filtering and content inspection before responses leave the application boundary.
- Detect prompt injection, abnormal retrieval depth, repeated lookup failures, and unusually large disclosures.
- Log model requests, tool calls, retrieval hits, and final outputs so investigators can trace leakage paths.
For architectures that rely on agents or autonomous tool use, current guidance suggests pairing static controls with runtime authorization and short-lived credentials. That aligns with the agentic security direction outlined in DeepSeek breach analysis, where broad access and weak containment amplify the impact of a single compromise. Standards such as NIST Cybersecurity Framework 2.0 support the operational discipline, while security teams should also map AI-specific policy enforcement to request time rather than trusting a fixed prompt or a one-time approval. These controls tend to break down in high-volume copilots that can chain tools across multiple systems because the disclosure path becomes distributed across retrieval, generation, and export steps.
Common Variations and Edge Cases
Tighter filtering often increases latency and false positives, requiring organisations to balance user experience against the need to stop sensitive data from leaving the environment. The right approach depends on whether the AI system is answering questions, summarising internal content, drafting outbound messages, or taking actions through tools. Best practice is evolving, and there is no universal standard for this yet.
For retrieval-augmented generation, a common edge case is that the model may not directly expose a secret but can still reconstruct enough context to reveal sensitive facts. For agentic workflows, the risk is higher because the system can chain benign actions into a full disclosure path. In those environments, security teams should prefer per-request entitlements, scoped retrieval, and explicit egress controls over trusting the model to “know better.” NHIMG’s Sisense breach and the Schneider Electric credentials breach both reinforce a basic lesson: once sensitive access is too broad, downstream abuse becomes much harder to contain.
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, CSA MAESTRO and OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST AI RMF and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Agentic AI Top 10 | LLM-03 | Prompt injection and tool abuse are central exfiltration paths for AI apps. |
| CSA MAESTRO | AI-04 | Covers runtime control of agent actions and data exposure boundaries. |
| NIST AI RMF | AI RMF addresses governance and monitoring of harmful AI behavior. | |
| OWASP Non-Human Identity Top 10 | NHI-03 | Short-lived secrets and least privilege reduce blast radius in AI integrations. |
| NIST CSF 2.0 | PR.AC-4 | Least privilege and access enforcement directly limit model data reach. |
Restrict tool access, inspect prompts, and block unsafe outputs before they exit the app.
Related resources from NHI Mgmt Group
- How should security teams design AI systems so agents can retrieve company-specific knowledge without relying on model memory alone?
- How should security teams use AI to analyze access data in business applications without over-trusting the output?
- How should security teams prioritize sensitive data findings without relying on volume alone?
- How should security teams govern shadow AI without relying on discovery alone?
Deepen Your Knowledge
Reviewed and updated by the NHIMG editorial team on August 31, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org