TL;DR: MCP-based AI assistants can be pushed into privilege escalation, data exfiltration, and code execution when tools, local resources, and inherited access are treated as trustworthy by default, according to Bishop Fox’s otto-support CTF. The core failure is not model capability but weak isolation around the assistant’s operating context.
At a glance
What this is: This is a hands-on MCP security CTF that demonstrates how AI assistants can be manipulated through tool abuse, prompt injection, and source-code-driven exploitation to cross privilege boundaries.
Why it matters: It matters because MCP changes the identity problem from simple API access to runtime authority, so IAM, PAM, and security teams must govern what an AI assistant can reach, execute, and inherit.
By the numbers:
- When AWS credentials are exposed publicly, attackers attempt access within an average of 17 minutes, and as quickly as 9 minutes in some cases.
👉 Read Bishop Fox’s otto-support CTF analysis of MCP attack surfaces
Context
MCP security is no longer a theoretical concern. The core issue is that an AI assistant can inherit tool access, local file visibility, and service connectivity in ways that traditional application security reviews do not model well, especially when those permissions sit inside a developer workstation or agent runtime.
The otto-support CTF turns that gap into a practical exercise. It shows how AI assistants interacting through MCP can be led across privilege tiers, into sensitive data exposure, and eventually toward code execution, which is a realistic pattern for any environment that lets tools and local resources share trust boundaries.
Key questions
Q: How should security teams govern MCP servers used by AI coding assistants?
A: Treat MCP servers as privileged trust boundaries, not simple data sources. Security teams should classify each server by the authority it can influence, sanitize any user-generated or third-party content before delivery, and limit the agent’s tool access so malicious context cannot easily become destructive action.
Q: Why do MCP-based assistants increase the risk of privilege escalation?
A: Because they can combine prompt-driven behaviour with real tool execution and inherited access. A weak tool boundary can let a normal interaction reach internal services, local files, or privileged commands. The risk rises when the assistant’s effective authority is broader than the user’s intent or the application’s visible permission model.
Q: What do teams get wrong about prompt injection in AI assistants?
A: They treat it as a content safety issue instead of an access issue. Prompt injection becomes dangerous when the assistant can read sensitive history, call APIs, or write files on the user’s behalf. The risk is not only what the prompt says. It is what identity and egress permissions allow the prompt to trigger.
Q: How can organisations tell whether an AI assistant has too much authority?
A: Look for signs that a single assistant session can access secrets, internal services, and code execution paths without a separate approval step. If tool inventory, environment inheritance, and privilege changes are not individually reviewable, the assistant’s authority is already beyond what most governance models can safely justify.
Technical breakdown
How MCP expands the assistant attack surface
Model Context Protocol lets an assistant do more than generate text. It can call tools, reach internal services, inspect local files, and operate with environment variables inherited from the host process. That makes the assistant part of the execution path, not just the interface. The security problem is that the protocol does not create trust by itself. It moves sensitive actions into a context where prompt content, tool responses, and local state can all influence what happens next.
Practical implication: treat every MCP-connected assistant as a privileged runtime and constrain the tools, files, and services it can see.
Why local and stdio MCP servers are especially risky
Local MCP servers often inherit the parent process environment, which means secrets, configuration, filesystem paths, and internal network reach can all become exposed to a compromised toolchain. In containerised or workstation-based deployments, that inheritance can be enough for an attacker to pivot from prompt manipulation into credential discovery or command execution. The risk is not merely the server itself, but the ambient authority around it. Once that environment is broad, the assistant becomes a lens into the host.
Practical implication: isolate local MCP servers in minimal environments and remove unnecessary credentials, mounts, and network exposure.
Why source code review still matters in AI-assisted exploitation
MCP and AI assistant attacks are often runtime-driven, but source code still reveals the real trust model. Tool names, hidden privilege transitions, unsafe assumptions about input handling, and internal service wiring are usually easier to spot in code than in behaviour alone. Dynamic testing then confirms whether those paths are actually reachable. That combination matters because many AI business systems fail not in the model layer but in the surrounding application logic that decides what the assistant may invoke.
Practical implication: assess AI-enabled applications with both source review and runtime testing, especially where tools can cross privilege boundaries.
Threat narrative
Attacker objective: The attacker wants to turn an AI assistant’s inherited trust into a path for privileged access, sensitive data theft, and code execution.
- entry occurs when an attacker manipulates a vulnerable MCP-connected assistant or local service through tool exposure, prompt injection, or an unauthenticated debugging path.
- escalation follows when the assistant or connected server inherits broader access than intended and begins reaching internal services, local files, or privileged tools.
- impact is achieved through data exfiltration, unsafe command execution, or lateral movement from the compromised runtime into adjacent systems.
Breaches seen in the wild
- Meta AI Instagram Account Takeover — 20,225 Instagram accounts hijacked via compromised Meta AI support chatbot with overprivileged access.
- Replit AI Tool Database Deletion — Replit vibe coding AI assistant deletes live production database and creates 4,000 fake user records.
Read our 52 NHI Breaches Analysis report for a comprehensive view of breaches impacting Non-Human Identities including AI Agents.
NHI Mgmt Group analysis
MCP creates an identity boundary problem, not just an integration problem. Once an assistant can call tools and inherit host context, the security question changes from authentication to delegated runtime authority. Traditional app controls assume the caller is known and bounded before action begins. With MCP, the assistant can become the action path itself, which means governance must follow the runtime, not just the login event.
Ambient access is the real flaw in local AI deployments. The dangerous condition is not that an assistant exists on the endpoint. It is that the endpoint already contains credentials, filesystem reach, and internal service paths the assistant can inherit without a separate governance decision. That makes the local environment part of the identity surface, and practitioners should treat ambient privilege as a design defect rather than an operational surprise.
Source code analysis is now part of AI assistant security assessment. Tool ecosystems, hidden privilege tiers, and unsafe routing logic are often embedded in the application itself, not the model. That means security teams need to inspect how tools are exposed, how privilege changes occur, and which assumptions the assistant is allowed to make. The practical conclusion is that black-box testing alone will miss the control failure.
Identity blast radius: once an assistant can combine tool access with inherited local authority, a single compromise can span files, services, and code execution paths that were never meant to be governed together. This is the clearest lesson from MCP-based attack surfaces. The governance model must assume that one assistant session can traverse multiple trust domains, so boundary design matters as much as privilege assignment.
From our research:
- When AWS credentials are exposed publicly, attackers attempt access within an average of 17 minutes, and as quickly as 9 minutes in some cases, according to LLMjacking: How Attackers Hijack AI Using Compromised NHIs.
- The same research found that DeepSeek accidentally embedded over 11,000 secrets in training data and exposed more than one million sensitive records, showing how quickly secret hygiene failures scale.
- For adjacent analysis, see 52 NHI Breaches Analysis for recurring patterns in credential exposure and downstream abuse.
What this signals
MCP is moving AI assistants into the identity governance domain. Once tools, services, and local resources are reachable from a conversational interface, IAM teams can no longer stop at sign-in controls. The programme now has to govern what the assistant can inherit, what it can invoke, and what it can retain after the session ends, which is a materially different control problem from standard application access.
Identity blast radius becomes the metric that matters. When an assistant can combine inherited access with internal services and local execution, the relevant question is not whether the model is safe in isolation. It is how far a compromised session can travel before containment kicks in, and that makes environment design, tool scoping, and session isolation operational priorities.
If your team is formalising governance for AI assistants, the reference points are already available in the OWASP NHI Top 10 and the NIST AI Risk Management Framework. The useful next step is to map assistant tool access to those controls before broad deployment turns a prototype into a permanent trust boundary.
For practitioners
- Isolate MCP-enabled assistants from ambient host privilege Run AI assistants and MCP servers in minimal containers or dedicated environments with only the credentials, mounts, and network paths required for the task. Remove inherited access that is not explicitly needed for the workflow.
- Inventory every tool and privilege tier exposed to the assistant Map each MCP tool to the data it can touch, the services it can reach, and the identity context it uses. Pay special attention to tier transitions, because hidden escalation paths often live in the tool catalogue rather than in the model.
- Review source code before trusting runtime behaviour Inspect how tool calls are assembled, how prompts are handled, and where local resources are inherited. Use runtime tests to confirm the code path, but do not rely on runtime alone to reveal unsafe defaults or implicit trust.
- Harden tool ecosystems with approved integrations only Allow only vetted plugins, signed extensions, or internally approved tools where possible. Unreviewed marketplace-style add-ons should be treated as a supply chain risk because they can execute with the assistant’s effective authority.
Key takeaways
- MCP turns AI assistants into a runtime identity problem because tools, local resources, and internal services can all become part of the attack surface.
- The clearest failure mode is ambient privilege, where the assistant inherits more access from the environment than the business intended to grant.
- Security teams need to review tool exposure, environment isolation, and source code together if they want to control AI-assisted execution safely.
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 OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST CSF 2.0, NIST AI RMF and NIST Zero Trust (SP 800-207) set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Agentic AI Top 10 | A2 | The article focuses on agent tool misuse and unsafe execution paths. |
| OWASP Non-Human Identity Top 10 | NHI-03 | Inherited credentials and ambient access are the core NHI issue here. |
| NIST CSF 2.0 | PR.AC-4 | The post centers on least-privilege access across tools and internal services. |
| NIST AI RMF | GOVERN | AI assistant governance and accountability are central to the analysis. |
| NIST Zero Trust (SP 800-207) | Zero trust principles fit the assistant, tool, and host boundary model discussed here. |
Assign clear ownership for AI assistant access decisions and review them under governance processes.
Key terms
- Model Context Protocol: Model Context Protocol is an open protocol that lets AI agents connect to tools and data sources. It expands what an agent can reach, so governance has to cover not only the model and its prompts, but also every system that can receive or return agent-driven data.
- Ambient access: Ambient access is the unintentional authority a process inherits from its environment, such as secrets, filesystem visibility, or network reach. In AI assistant deployments, ambient access often becomes the hidden privilege layer that turns a seemingly normal tool invocation into a security incident.
- Identity Blast Radius: The amount of damage a compromised identity can cause across systems, data, and infrastructure. In NHI environments, it is shaped by permissions, network reach, and administrative capability rather than by the credential alone. Reducing blast radius is a containment strategy that limits lateral movement and data exposure.
- Tool Abuse: Tool abuse occurs when an AI assistant is manipulated into making actions through connected APIs, plugins, or workflows that the user did not intend. The risk is not only incorrect output, but execution of legitimate systems with attacker-chosen inputs or destinations.
What's in the full article
Bishop Fox's full article covers the operational detail this post intentionally leaves for the source:
- Hands-on CTF setup steps for running the vulnerable MCP server in a container or on a host
- The full privilege-tier progression across 19 tools and four access levels
- Source repository guidance for combining runtime testing with code review
- Case-study commentary on local MCP exposure, prompt injection, and unsafe tool execution
👉 Bishop Fox’s full post covers the CTF build, privilege tiers, and exploitation paths in detail.
Deepen your knowledge
NHI governance, agentic AI identity, and machine identity security are core topics in our NHI Foundation Level course, the industry's only accredited NHI security programme. If you are building or maturing an IAM programme, it is worth exploring.
Published by the NHIMG editorial team on August 11, 2026.
NHI Mgmt Group — the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org