By NHI Mgmt Group Editorial TeamBased on OXSecurity: “Flowise (CVE-2026-40933) & Upsonic (CVE-2026-30625): What to do when best practice isn’t enough?” (April 27, 2026)

TL;DR: Sanitizing user input to custom MCP stdio configurations can still fail when Python or Node.js arguments trigger OS-level commands, leaving command execution and server takeover possible even in hardened AI systems, according to OXSecurity. The real issue is not just input filtering but the trust assumption that validation alone can contain execution paths.


At a glance

What this is: OXSecurity shows that MCP STDIO sanitization can be bypassed when arguments in Python or Node.js workflows trigger OS-level command execution.

Why it matters: IAM and platform teams need to treat MCP command paths as execution surfaces, not just input-validation problems, because weak isolation can expose secrets, environment variables, and host access.


Context

MCP STDIO becomes a security problem when a system treats user input as safely contained after sanitisation, but the runtime still allows arguments to resolve into operating system commands. In that model, the control is aimed at syntax, while the risk sits in execution semantics.

This article is about a supply chain style failure in AI and integration architecture: the boundary between approved command strings and executable behaviour is weaker than many teams assume. For identity and access practitioners, that means MCP exposure is not just an application issue but a governance issue around what the runtime can do with delegated access.

OXSecurity's examples with Flowise and Upsonic show that even hardened checks can leave a direct path from user input to code execution when STDIO servers are exposed without strong isolation or authentication. That makes the problem relevant to NHI governance, AI platform security, and workload access control.


Key questions

Q: What breaks when MCP STDIO input sanitisation is the only control in place?

A: Sanitisation breaks because it only filters the string presented to the application, not the later execution path created by language runtimes and subprocess calls. If approved arguments can still invoke OS commands, the control fails at the interpreter boundary and the server remains reachable for command execution and takeover.

Q: Why do command-enabled MCP servers increase risk for API keys and host access?

A: Because the server often inherits the privileges of the host process that runs it. Once command execution is possible, those inherited rights can expose environment variables, local secrets, filesystem data, and network access that were never meant to be influenced by the original user request.

Q: What are the signs that MCP credential handling is too exposed?

A: The warning signs are API keys, tokens and session details stored in config files, on laptops or in shared environment variables, especially when key management is not separated from data storage. Those patterns create a broad, hard-to-review exposure surface and make offboarding, incident response and compliance evidence much harder.

Q: How should teams decide whether to keep STDIO command execution enabled?

A: Keep it disabled unless the use case genuinely requires command execution and the server can be isolated, authenticated, and tightly scoped. If the feature is not operationally necessary, the safer decision is to remove the attack surface rather than try to police every input edge case.


Technical breakdown

Why STDIO sanitization does not stop command execution

STDIO-based MCP integrations often rely on allowlists and character stripping to stop shell injection. That works only when the application interprets input directly and never re-encodes it into a runtime command path. In Python and Node.js, arguments can be passed to libraries or wrappers that eventually invoke an OS command, so the unsafe transition happens after the sanitiser has already approved the input. The important distinction is between filtering a string and constraining an execution graph. If the graph still reaches a shell, a subprocess, or another interpreter layer, the original checks are not a full control boundary.

Practical implication: Treat sanitisation as a narrow input control, not as proof that execution cannot be reached.

Why MCP STDIO creates a larger blast radius than many teams expect

MCP STDIO servers sit close to the runtime environment, which means a successful bypass can expose more than the immediate request path. Once command execution is possible, an attacker may reach API keys, environment variables, local files, or internal network access tied to the hosting process. That shifts the risk from application misuse to host compromise. For identity teams, the important issue is that the MCP server often inherits privileges that were never meant to be user-controllable. A weakly governed runtime becomes a proxy identity with far more access than the requester should ever influence.

Practical implication: Map every STDIO server to the secrets and host permissions it can inherit.

Why authentication and sandboxing matter when execution is unavoidable

If STDIO execution is genuinely required, the problem becomes one of containment and access control. Authentication limits who can reach the server at all, while sandboxing limits what a compromised server can touch after a bypass occurs. These are different controls. One governs entry, the other limits damage. In MCP environments, that distinction matters because the flaw is not just unauthorized use of a feature but delegated execution reaching a privileged host context. The safer design is to assume the command path will be probed and to make the surrounding environment absorb the failure.

Practical implication: Place any unavoidable STDIO execution behind strong authentication and an isolated runtime boundary.


Threat narrative

Attacker objective: The attacker aims to convert a filtered input path into command execution and then use the compromised MCP server to reach host-level assets and secrets.

  1. Entry occurs when a user can submit input to a custom MCP STDIO configuration that is reachable from an application or AI service.
  2. Credential or command abuse follows when Python or Node.js arguments turn approved input into operating system command execution despite sanitisation.
  3. Escalation happens when the exposed MCP runtime inherits access to API keys, environment variables, or the hosting network.
  4. Impact is server takeover and broader compromise of the surrounding application environment.

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

Command sanitisation is a syntax control, not an execution control: This article shows that approving characters and command names does not guarantee safety when runtime arguments can still resolve into OS commands. That means the control boundary was drawn around the wrong layer. For identity and access teams, the practical conclusion is that execution authority must be governed where it is exercised, not where the text first arrives.

MCP stdio creates implicit privilege inheritance: The dangerous part is not only that a command can run, but that the MCP server often runs with access to secrets, environment variables, and network paths beyond the user's intent. This is a privilege design problem, not just an input-validation problem. The implication is that MCP services need explicit scope review like any other delegated runtime.

Input filtering failed because the trust model assumed deterministic command paths: The architecture assumed that sanitised input would remain non-executable throughout the chain. That assumption breaks when language runtimes can transform approved arguments into new execution paths. The result is an identity governance gap where least privilege was defined for the prompt layer, but not for the interpreter and host layers.

Runtime isolation is now part of MCP governance, not optional hardening: Once STDIO can reach the operating system, the control problem becomes containment of the host boundary. Organisations need to classify which MCP servers are permitted to execute code at all and which must be structurally denied that capability. The practical conclusion is to govern execution pathways as tightly as secrets.

Ephemeral command trust debt: Each temporary allowance for STDIO execution creates a debt that sanitisation cannot repay after the fact. The more the runtime is trusted to mediate user input into commands, the more the organisation depends on assumptions that are invisible at review time. Practitioners should treat that hidden trust as a design defect, not a tuning problem.

From our research library:

What this signals

Runtime trust now matters more than input trust: MCP teams should stop treating sanitisation as the end of the control story. When arguments can still become OS commands, governance must move to the execution layer and to the privileges inherited by the runtime.

The practical boundary is the sandbox, not the filter. If a server can execute code, it should be assumed to have a larger blast radius than its request surface suggests, which changes how identity teams review access, hosting, and secrets exposure.

For AI and platform programmes, MCP command paths should be reviewed the same way other delegated execution paths are reviewed: by asking what the runtime can reach if the next layer is abused, not only whether the first layer rejects bad characters.


For practitioners

  • Isolate MCP STDIO servers in a sandbox Run any code-executing MCP STDIO component in a restricted environment that cannot read broad host secrets, reach the wider network, or inherit unnecessary filesystem access.
  • Disable command execution by default Remove STDIO command execution unless a business case explicitly requires it, then re-enable only for approved use cases with documented ownership.
  • Require authentication before STDIO access Place strong authentication and access controls in front of any MCP endpoint that can invoke commands so unauthorised users cannot reach the execution path.
  • Review host-level secret exposure Inventory API keys, environment variables, and local resources reachable from MCP runtimes, then reduce the inherited privileges of every server that can execute code.

Key takeaways

  • MCP STDIO command paths can remain exploitable even after sanitisation, because arguments may still resolve into OS-level execution.
  • The real risk is delegated runtime privilege, including secrets, environment variables, and host access that sit behind the command boundary.
  • Teams should reduce or isolate STDIO execution, then require authentication and sandboxing wherever command capability cannot be removed.

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 MITRE ATT&CK address the attack and risk surface, while NIST CSF 2.0 sets the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Non-Human Identity Top 10NHI-04 — Insecure AuthenticationUnauthenticated or weakly governed MCP command access is central to the exposure described.
NHI-06 — Insecure Cloud Deployment ConfigurationsThe issue depends on unsafe runtime placement and insufficient isolation of command-capable services.
NHI-02 — Secret LeakageThe article explicitly warns that exposed runtimes can reveal API keys and environment variables.
Recommendation — Require strong authentication before any MCP STDIO server can execute commands or reach host resources. Isolate command-capable MCP runtimes so a bypass cannot reach secrets, files, or internal networks. Reduce secret exposure inside MCP hosts and prevent command paths from reaching credential material.
MITRE ATT&CKTA0006;TA0008 — Credential Access; Lateral MovementThe bypass enables access to secrets and movement from the host into the broader environment.
Recommendation — Map MCP command abuse to credential access and lateral movement when evaluating detection and response coverage.
NIST CSF 2.0PR.AA-05 — Access Permissions, Entitlements and AuthorizationsThe article is fundamentally about whether the runtime is authorised to execute commands and access host assets.
Recommendation — Apply entitlement review to every MCP server that can invoke operating system commands or inherit host privileges.

Key terms

  • MCP stdio: MCP stdio is a way for an AI agent to talk to a tool or service through standard input and standard output streams. In Model Context Protocol deployments, it usually means a local or process-level connection where messages are exchanged directly between the agent runtime and the MCP server without network transport.
  • Command execution boundary: A command execution boundary is the point at which a string stops being data and becomes an action on a system. In MCP and agentic environments, the boundary must be controlled at the runtime layer, because validation at the input layer does not necessarily prevent later execution.
  • Runtime Isolation: A containment pattern that separates risky execution from the main application so compromise has limited blast radius. For AI systems, it is the practical control that keeps a manipulated model response from inheriting full application or infrastructure privileges.
  • Delegated Execution: Delegated execution is when software is allowed to perform actions on behalf of a user, process, or business function. In NHI governance, the risk is that the delegated actor may chain actions beyond the original intent, so controls must focus on scope, approval, and revocation.

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 responsible for identity security strategy or NHI governance in your organisation, it is worth exploring.
NHIMG Editorial Note
Published by the NHIMG editorial team on August 2, 2026.
Updated on October 12, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org