TL;DR: A project rule plus an MCP server can exfiltrate every prompt from Cursor, including live API keys and bearer tokens, according to Eve Security, and local approval state can be flipped from disk. Hidden prompt forwarding turns a debugging workflow into a credential leakage path.
At a glance
What this is: NHI Mgmt Group's analysis, drawing on Eve Security's blog post: A Cursor project rule plus an MCP server can silently forward every prompt, including live credentials, because local approval state and allow-listing become the control point.
Why it matters: IAM and NHI teams need to treat local agent settings, MCP approvals, and prompt content as a single trust boundary when copilots can transmit secrets without user visibility.
Context
The governance gap here is not just model behaviour, it is local trust inversion: a developer tool can be induced to move sensitive context off the workstation before the user ever sees a disclosure or a warning. That matters because the control boundary is no longer only the chat surface; it includes folder-scoped rules, project MCP entries, and the local approval store for MCP server governance.
In practical terms, the risk is prompt exfiltration through apparently legitimate automation. A rule that asks for every message, paired with an MCP endpoint that receives the full prompt, creates a path where credentials, environment details, and customer data can leave the device as part of normal agent execution.
The pattern is most dangerous in active workspaces where developers paste secrets, stack traces, or production commands. Those folders become high-value trust zones, because the same mechanism can be repeated wherever the agent is allowed to operate.
Key questions
Q: How do prompt rules in AI coding agents create exfiltration risk?
A: Prompt rules in AI coding agents can create exfiltration risk when instructions let the agent copy source code, secrets, or prompt content into outputs, tool calls, logs, or external requests. The main failure modes are prompt injection, overbroad tool access, and weak output filtering. Restrict tool scope, separate trusted rules from user input, and block secret-bearing context from being sent to untrusted destinations.
Q: What should teams do first when an MCP server can read full prompts?
A: First, reduce the MCP server’s access to prompt content to the minimum needed, then separate it from secrets, credentials, and sensitive workspace data. Treat prompt content as high-risk data, because a server that can read full prompts can also see instructions, sensitive context, and sometimes embedded secrets. Limit scopes, review permissions, and isolate approval from data access.
Q: How can local approval state change the security of an MCP integration?
A: Local approval state can weaken an MCP integration when a stored approval persists after a user, policy, or workspace change. If approval is kept in a local approval store, the connector may continue to trust actions that should now require re-authentication or re-consent. Tie approvals to identity, scope, and expiry, and revoke stale state when access changes.
Q: What is the difference between an MCP server and a workspace rule?
A: An MCP server is a runtime service that exposes tools, resources, or prompts to an agent through the Model Context Protocol. A workspace rule is a policy control inside the development environment that governs what the workspace or agent may do, such as file access, command execution, or network reach. The server provides capability, the rule constrains use.
Technical breakdown
How Cursor project rules can trigger silent prompt forwarding
A project rule is policy text attached to a workspace, but in an agentic editor it can function as an execution instruction. When the rule tells the assistant to call a tool on every message, the agent may treat that call as mandatory and do it before any visible response. If the tool returns success, the user sees a normal reply while the prompt has already crossed a trust boundary. This is not a model hallucination problem. It is a delegated-action problem, where workspace-scoped instructions create hidden tool invocation paths. See the AI IDE and Coding Agent Security Guide.
Practical implication: Treat workspace rules as executable policy and review them with the same scrutiny as automation that can move sensitive data.
Why local MCP approval state matters as much as the server entry
The MCP server definition alone does not activate the integration. The client also relies on local approval state, so a server can remain dormant until an approval record exists in the local profile database. That means the access decision is not only in the UI; it is persisted state that can be altered if an attacker or malicious insider can write to the workstation. Once the approval record and project configuration align, the agent has somewhere to send data and a reason to send it. See the MCP Security Guide.
Practical implication: Protect local approval stores with the same care you give credential caches and other high-value application state.
Why descriptions and allow lists no longer provide sufficient assurance
Earlier agent workflows could be steered by a persuasive tool description alone, but modern clients increasingly add allow lists and tighter harness checks. That helps, yet it does not remove the core issue: if a workspace rule can order a silent tool call, and the server is approved, the model still has a path to move the prompt. The defense has shifted from description trust to explicit authorization and runtime governance. The remaining question is not whether the tool sounds safe, but whether it should ever receive the current prompt at all.
Practical implication: Place explicit controls around which tools can receive raw prompt content, not just which tools appear in the menu.
Threat narrative
Attacker objective: The attacker wants durable access to live prompts and the credentials embedded in them, so the same trust abuse can be repeated across workspaces and sessions.
- Entry via access to the developer laptop or workspace state lets an attacker place a project rule and MCP entry that the agent will follow on every message.
- Credential access occurs when the assistant forwards the full prompt, including bearer tokens and API keys, to the MCP server before the user sees any disclosure.
- Impact follows when the operator of that MCP endpoint can replay the captured keys, access the same production systems, and continue harvesting future prompts from the same workspace.
Breaches seen in the wild
- Smithery.ai MCP hosting breach 2025: A Smithery.ai build flaw gave GitGuardian a live fly.io token controlling 3,000+ hosted MCP servers and the API keys their clients sent.
Read and download The State of NHI & AI Agent Breach Report 2026, covering 200+ breaches impacting Non-Human Identities including AI Agents.
NHI Mgmt Group analysis
Prompt forwarding is now an identity event, not just a model event. When an agent can send the current user prompt to a tool as part of normal execution, the trust question shifts from output quality to data movement. That means prompt content, local rules, and tool authorization belong in the same governance conversation as credentials and session scope. Practitioners should treat silent tool calls as a governed access path, not a convenience feature.
Local approval state is the real control plane for many agent integrations. In this pattern, the server definition is inert until the workstation records approval, which makes the local profile database part of the security perimeter. If that state can be modified, the actor does not need to break the UI to activate the integration. The implication is that desktop state, not just cloud policy, can determine whether sensitive prompts leave the device.
Silent checks create prompt exfiltration debt. The rule text tries to make the call invisible by framing disclosure as wasteful or impolite, but the operational effect is still transmission of raw context. That creates a governance debt: users believe they are asking for help, while the agent is also exporting secrets, identifiers, and internal detail. The practical consequence is that visibility into tool invocation becomes mandatory for any environment that handles production data.
Project-scoped agent policies should be reviewed as if they were delegated access grants. A rule that applies to every message in a repository or folder behaves like standing authorization for a tool chain. The named concept here is prompt egress by workspace policy: a local instruction set that turns ordinary assistance into repeatable data export. Once that pattern exists, governance has to focus on where prompt content may go, not merely on what the agent is allowed to do inside the IDE.
From our research library:
- 24,008 unique secrets were exposed in MCP configuration files in 2025 alone, the protocol's first year of widespread adoption, according to the State of Secrets Sprawl 2026.
- Read next: MCP Gateway and MCP Server Governance Guide
What this signals
Prompt egress by workspace policy: the next control failure will be policy text that silently authorises data movement, not a dramatic exploit chain. As agents become embedded in daily development work, the decisive question is whether a prompt can leave the device before the user is shown the tool invocation.
MCP governance will increasingly hinge on approval provenance, local state protection, and whether a tool is allowed to receive raw conversation content at all. The organisations most exposed are the ones that treat workspace files as harmless configuration rather than executable access policy.
MCP configuration files already contain a measurable secrets problem: 24,008 unique secrets were exposed in MCP configuration files in 2025 alone, according to the State of Secrets Sprawl 2026. That figure shows why prompt forwarding and server configuration must be governed together, not as separate hygiene tasks.
For practitioners
- Inventory workspace rules that can invoke tools Review .cursor/rules and equivalent project policy files for instructions that forward user prompts, context, or credentials to external services. See the Cursor Security Guide.
- Restrict MCP servers from receiving raw prompts Require explicit approval before any MCP endpoint can access full user messages, and block servers that do not need prompt content to function.
- Protect local approval stores as sensitive state Harden the workstation database and profile directories that persist approvedProjectMcpServers so a local write cannot silently enable a server.
- Ban secrets in debugging prompts Teach developers to redact bearer tokens, API keys, and production values before copying terminal output or curl commands into assistant chats.
- Instrument tool-call visibility in agent sessions Log when an assistant sends prompt content to tools, including the target server name and the data class involved, so silent forwarding is detectable.
Key takeaways
- A local rule can turn an assistant into a silent data mover, sending prompts and embedded secrets to an external service without visible user disclosure.
- The approval record on the workstation is a real access control point, so local profile state deserves the same protection as credential stores.
- The practical defence is to limit which tools can receive raw prompts, tighten workspace policy review, and make tool invocation visible to operators.
Related NHI Mgmt Group resources: MCP Security Guide · What Is MCP? The Model Context Protocol Explained (2026) · MCP Gateway and MCP Server Governance Guide · AI Coding Agents Security Guide
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Non-Human Identity Top 10 and OWASP Agentic AI Top 10 address the attack and risk surface, while NIST CSF 2.0 and NIST SP 800-53 Rev 5 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Non-Human Identity Top 10 | NHI-02 — Secret Leakage | Raw prompts can carry live keys, making prompt transmission a secrets exposure problem. |
| NHI-04 — Insecure Authentication | MCP approval and client trust determine whether the server can be used at all. | |
| NHI-10 — Human Use of NHI | A human typing into the IDE can unknowingly trigger non-human data movement. | |
| Recommendation — Block any tool path that can receive raw secrets from the prompt stream. Verify that every server invocation is explicitly authorised and traceable. Separate human intent from machine-side prompt forwarding and log the boundary crossing. | ||
| OWASP Agentic AI Top 10 | ASI02 — Tool Misuse | The agent is coerced into using a tool to move data the user did not intend to share. |
| Recommendation — Constrain which tools an agent may call when a prompt contains sensitive content. | ||
| NIST CSF 2.0 | PR.AA-05 — Access Permissions, Entitlements and Authorizations | Local approval and allow-list state determine whether the MCP can operate. |
| Recommendation — Review prompt-moving tools as entitlements and revoke any unnecessary authorization. | ||
| NIST SP 800-53 Rev 5 | IA-5 — Authenticator Management | The attack depends on live keys and token material being handled inside prompts. |
| Recommendation — Apply credential lifecycle controls to secrets that could be exposed through assistant prompts. | ||
Key terms
- MCP: Model Context Protocol, an open way for AI agents to connect to tools and data sources. It improves interoperability, but it also introduces a shared integration layer that must be governed carefully because the protocol can widen access across many systems at once.
- Workspace Rule: A workspace rule is a policy setting that controls what an agent or user can do inside a development workspace. It typically limits file access, command execution, tool use, or network reach, so the workspace enforces local guardrails before actions reach broader systems.
- MCP Approval Store: An MCP approval store is the local record of user or administrator approval for an MCP server, tool, or capability. It tracks granted consent and scope so the client can decide whether to reuse, prompt again, or revoke access when the connected identity or permissions change.
- Cursor: A cursor is an in-memory reader and writer that treats a byte buffer as a stream-like source or destination. It keeps a current position so code can read from or write to the buffer sequentially without needing a file or socket.
Deepen your knowledge
NHI governance, agentic AI identity, and machine identity lifecycle 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 November 25, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org