requestState becomes risky when it can influence authorization, resource access, or business logic without integrity protection. Because the client carries it across calls, it must be bound to the principal, limited by TTL, and verified on receipt. Without that, it behaves like attacker-controlled input rather than protected context.
Why requestState becomes risky in MCP deployments
requestState is not dangerous because it exists in the protocol. It becomes dangerous when teams let it drive authorization, tool selection, tenant routing, or downstream business logic without cryptographic integrity and receipt-time validation. In an MCP deployment, that turns client-carried context into a control plane input, which is exactly where attackers look for trust boundaries that were assumed rather than enforced.
This is especially relevant because MCP server security failures often start with weak handling of secrets and access scope. NHIMG’s The State of MCP Server Security 2025 reports that only 18% of deployments implement any form of access scoping for tool permissions, which means state-related decisions are frequently made in environments that already lack strong containment. The same pattern appears in broader identity work, where NHIMG’s The State of Non-Human Identity Security shows how often teams underestimate context-bound identity risk until compromise has already propagated.
Practitioners usually miss the problem because requestState looks like harmless session metadata, but in production it often becomes a hidden input to privileged behavior. In practice, many security teams encounter the failure only after a tool invocation, data leak, or tenant crossover has already happened, rather than through intentional review of trust boundaries.
How requestState should be handled in practice
The right model is to treat requestState as untrusted until proven otherwise. It should be bound to the principal, tied to a specific session or task, and checked on every hop where it affects access or behavior. That means integrity protection, short time-to-live, and receipt-time validation are not optional extras; they are the only things that keep requestState from becoming attacker-controlled context.
Security teams should assume the state may be replayed, modified, or copied across workflows. A practical control set usually includes:
- Sign or MAC the state so the server can detect tampering.
- Bind the state to the authenticated workload identity, not just a client instance.
- Limit lifespan aggressively so stale state cannot outlive the task it describes.
- Re-evaluate authorization at use time instead of trusting a prior decision.
- Reject state that changes tenant, scope, or tool intent outside an approved workflow.
This aligns with current guidance in the OWASP Agentic AI Top 10, which emphasizes that autonomous systems need tighter runtime validation than static application patterns provide. It also maps cleanly to NIST Cybersecurity Framework 2.0 because the control objective is still straightforward: identify, protect, detect, respond, and recover around a state object that can affect privilege.
For MCP specifically, requestState should never be the sole source of truth for access decisions. The server should corroborate it against authenticated context, policy, and task scope before allowing the request to continue. These controls tend to break down in multi-tenant MCP gateways where upstream proxies rewrite headers or cache state inconsistently, because the verification point and the enforcement point stop being the same system.
Common variations and edge cases to watch
Tighter state validation often increases implementation overhead, requiring organisations to balance protocol convenience against integrity, latency, and debugging complexity. That tradeoff is real, especially when teams want requestState to improve usability across chained tool calls.
Best practice is evolving for several edge cases. There is no universal standard for whether requestState should be signed at the application layer, protected by transport guarantees alone, or both. Current guidance suggests that transport security is necessary but not sufficient when the state influences authorization or resource selection. If intermediaries can mutate, replay, or synthesize state, the server still needs its own integrity check.
One common mistake is assuming that a low-risk “session helper” can never become privileged. In agentic or automation-heavy deployments, state often accumulates meaning over time: tenant selection, user intent, job identifiers, retry counters, and tool routing hints can all become security-relevant. Another edge case is long-running jobs. When a request spans minutes or hours, stale state can outlast the context it was meant to describe unless TTL and revalidation are enforced.
The safest rule is simple: if requestState can change what the server is allowed to do, it needs the same care as a secret-adjacent control input. If it cannot be independently trusted, it should be treated as advisory only, not authoritative.
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, OWASP Agentic AI Top 10 and CSA MAESTRO 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 Non-Human Identity Top 10 | NHI-03 | Covers weak lifecycle handling of non-human identity context and credentials. |
| OWASP Agentic AI Top 10 | A1 | Agentic systems need runtime checks because autonomous behavior can misuse carried state. |
| CSA MAESTRO | MAESTRO addresses governance controls for autonomous workflows and runtime trust decisions. | |
| NIST AI RMF | AI RMF addresses governance and risk controls for dynamic, context-driven AI behavior. | |
| NIST CSF 2.0 | PR.AC-4 | Access permissions must be managed against authenticated context, not client-supplied state. |
Bind requestState to the workload identity and enforce short-lived, verifiable state throughout the session.
Related resources from NHI Mgmt Group
- What is MCP in the context of AI security?
- How should security teams limit the risk from AI agents that have access to production systems?
- Why do MCP deployments create NHI risk beyond normal application security?
- Why do MCP deployments create security risk when they are adopted faster than governance controls?