Back to Blog
Anthropic MCP SDK Vulnerability (April 2026): Full Analysis
AI AuditsAIMCPHacks

Anthropic MCP SDK Vulnerability (April 2026): Full Analysis

12 min

TL;DR

  • On April 15, 2026, OX Security disclosed a systemic vulnerability in the official Anthropic MCP SDKs — Python, TypeScript, Java, and Rust — that allows configuration values to flow directly into command execution via the STDIO transport.
  • Blast radius: ~7,000 public MCP servers built on the official SDKs and 150M+ combined downloads across npm and PyPI all inherit the same architectural exposure.
  • Anthropic's response: "behavior is by design… STDIO execution model represents a secure default and… sanitization is the developer's responsibility." No patch will be issued.
  • Multiple downstream CVEs followed (CVE-2025-65720, CVE-2026-30615, -30617, -30618, -30623, -30624, -30625, -33224, -26015), all instances of the same root pattern in different consumers of the SDK.
  • This is the OWASP ASI04 attack class at protocol scale: a vendor-acknowledged, vendor-unfixed weakness in the agentic supply chain that every operator now inherits.

What was disclosed

OX Security's April 2026 research, titled "The Mother of All AI Supply Chains," documented a single architectural pattern in the official MCP SDKs that produces remote code execution under realistic deployment conditions. The pattern is not a bug in the traditional sense. It is a deliberate execution model: the SDK takes configuration data — file paths, command names, arguments, environment variables — and uses those values as the invocation parameters that spawn the MCP server child process. There is no inherent sanitisation between configuration input and exec call.
In a single-developer setup where the developer authors all configuration manually, this is not exploitable. In any production deployment where configuration is loaded from a manifest, a registry, an environment variable, a default supplied by a package, or any other channel that is not under the operator's complete control, it becomes a configuration-channel injection attack surface.
The disclosure produced an immediate cluster of downstream CVEs: each MCP-host product or framework that consumed the SDK in a way that surfaced configuration to user-controllable inputs was independently rated. The CVE list spans LibreChat, WeKnora, and several other agent platforms, with severity ratings that include Critical (CVSS ≥9.0).

The technical mechanism

The MCP STDIO transport works as follows. A host application (Claude Desktop, Cursor, an enterprise agent runtime — collectively the MCP host) wants to use a local MCP server. The host reads a JSON manifest that specifies the server's executable path, arguments, and environment. The host calls a spawn primitive (subprocess.Popen, child_process.spawn, ProcessBuilder.start) with those values, and a child process starts. JSON-RPC messages then flow over the child's stdin and stdout.
The vulnerability lives in the path between the manifest and the spawn primitive. The official SDKs accept the manifest's command-line fields essentially raw, with no allowlist on executable paths, no schema validation on arguments, no quoting enforcement, and no sanitisation of environment variables that influence the child's behaviour. If an attacker can write to any of these channels — directly or through a chain of trusted-but-compromised intermediaries — they control what executes on the host.
The exploit primitives are familiar from a decade of shell-injection research:
  • Manifest poisoning. A malicious npm or PyPI package ships its own MCP manifest fragment. The host merges it into the active configuration. Any field the host hands to spawn becomes attacker-controlled.
  • Default-value injection. A package's exported defaults influence the manifest. Attackers compromise the package and ship a default that includes a malicious executable path.
  • Environment-variable smuggling. The SDK's spawn call inherits the host's environment plus whatever the manifest adds. Smuggled LD_PRELOAD, PYTHONPATH, NODE_OPTIONS, or analogous variables redirect execution into attacker-controlled code.
  • Argument injection. Even where the executable path is constrained, argument-list values are merged into the spawn call without quoting validation, producing classical option-injection bugs.
Each of the downstream CVEs is a different consumer of the SDK that surfaced one of these primitives in a user-reachable way.

Why "by design" is the headline

The most consequential aspect of this disclosure is not the vulnerability itself — it is Anthropic's response. The official position, paraphrased from the security advisory: STDIO transport is correctly modelled as a "secure default" because the host process is the security boundary; it is the host's responsibility to validate any input that reaches the spawn call.
This is technically defensible at the level of a single developer running a single MCP server they wrote themselves. It is operationally untenable at the scale MCP has reached. The 150M+ combined SDK downloads include startups, regulated enterprises, and security-sensitive products (IDEs that hold credentials, agents that touch wallets, browser extensions that inject into web sessions). None of these are equipped to retrofit a sanitisation layer between every possible configuration source and every spawn call in their dependency tree.
The practical consequence: every consumer of the official SDKs now operates a by-design vulnerability — a security-impacting behaviour that the upstream vendor explicitly will not change. The burden of mitigation moves entirely to operators, and the SDK provides no off-the-shelf primitive to help them.

The blast radius

Three independent measurements quantify what's exposed:
~7,000 public MCP servers built on the official SDKs (per OX Security's analysis). This is the directly addressable population of public servers that inherit the pattern.
150M+ combined downloads across the four official SDKs in npm and PyPI. This is the much larger population of consumers — applications, agent frameworks, internal tools — that embed the SDK and therefore inherit the exposure even when they do not run a public MCP server.
1,467 internet-exposed MCP servers at the time of Trend Micro's October 2025 measurement — nearly tripled in six months. Public-internet exposure is the most attacker-accessible subset, and its growth rate compounds the structural risk.
Inside organisations that operate MCP servers internally, the population is meaningfully larger and unmeasured.

How this fits into OWASP ASI04

This disclosure is the highest-magnitude single instance of the OWASP ASI04 (Agentic Supply Chain Vulnerabilities) attack class to date. It maps onto the standard's framing precisely:
  • The compromised component is a third-party SDK loaded into the agent host's runtime — the literal definition of the agentic supply chain.
  • The attack surface is the configuration channel feeding the SDK, not the SDK's runtime API — fitting ASI04's "trust the input, not just the code" pattern.
  • The downstream CVEs (LibreChat, WeKnora, etc.) are each an instance of trojanised-connector-adjacent risk where the connector itself is honest but its configuration path was compromised.
In other words: ASI04 is the standards framing. The April 2026 disclosure is the production-scale validation.

Detection

For any organisation running MCP servers built on the official SDKs, the detection question is not whether the pattern applies (it does — that's the point of an architectural disclosure) but whether your specific deployment is exploitable. Three concrete checks:
1. Enumerate every spawn-influencing config source. Manifest files. Environment variables. Package defaults. Registry entries. Hosted configuration endpoints. Anything whose contents flow into a spawn call. List them.
2. Identify which of those sources is writable by anyone other than the operator. Anything an attacker can influence — a downstream package maintainer, a registry curator, a supply-chain compromise upstream, a user with write access to a shared config — is in scope.
3. Trace each writable source through the SDK to the spawn primitive. Where the source content reaches exec without an allowlist, schema validation, or sanitiser between, you have a confirmed exploit primitive in your deployment.
Most production teams have never produced this trace. Doing so is the audit baseline.

Mitigation

Until or unless Anthropic reverses position, mitigation is operational. The five controls below cover the disclosed CVE patterns:
1. Pin SDK versions. Lockfiles for every consumer of @modelcontextprotocol/sdk, mcp (PyPI), the Java SDK artefact, and the Rust crate. Refuse auto-updates. The version pinning slows propagation of additional defaults-poisoning attacks.

Are you audit-ready?

Download the free Pre-Audit Readiness Checklist used by 30+ protocols preparing for their first audit.

No spam. Unsubscribe anytime.

2. Allowlist executable paths. Every spawn call should resolve its executable through a strict allowlist of binary paths the operator has reviewed and signed off on. Refuse any spawn that resolves outside the allowlist.
3. Schema-validate arguments. Every argument passed to a spawn call should validate against a strict, per-server schema before reaching exec. Reject unknown arguments. Reject argument values that do not parse as the expected type.
4. Strip dangerous environment variables. LD_PRELOAD, LD_LIBRARY_PATH, PYTHONPATH, NODE_OPTIONS, NODE_PATH, JAVA_TOOL_OPTIONS, RUST_BACKTRACE and similar should not be inheritable by spawned MCP server processes unless the operator has explicitly validated the value.
5. Sandbox the child process. Containers, seccomp profiles, AppArmor/SELinux confinement, or platform-equivalent isolation. The goal is that even successful command execution against the child does not compromise the host's credentials, network, or filesystem.
For Web3 and DeFi teams specifically, the additional rule applies: an MCP server that holds wallet credentials, signing authority, or RPC access must run in a process boundary distinct from any other connector and with no inheritable environment from the agent host.
A Zealynx MCP Security Audit tests every one of these controls against your specific deployment, and produces a written report mapping each finding to the April 2026 disclosure plus the OWASP ASI04 standard.

FAQ

1. What is the April 2026 Anthropic MCP SDK vulnerability?
The April 2026 Anthropic MCP SDK vulnerability is a systemic configuration-channel injection flaw in the official MCP SDKs (Python, TypeScript, Java, Rust) where configuration values flow directly into the command line used to spawn MCP server child processes via the STDIO transport. An attacker who controls any configuration source can execute arbitrary commands on the MCP host. It was disclosed by OX Security on April 15, 2026.
2. Why did Anthropic decline to patch this vulnerability?
Anthropic declined to patch because they consider the behaviour a deliberate part of the STDIO execution model. Their official position is that STDIO transport is a "secure default" and that input sanitisation between configuration and the spawn call is the developer's responsibility. This makes the issue a by-design vulnerability: vendor-acknowledged, security-impacting, and explicitly not going to be fixed upstream.
3. How many MCP servers are affected?
Approximately 7,000 public MCP servers built on the official SDKs are directly affected, plus the much larger population of applications and frameworks embedding the SDKs — over 150 million combined downloads across npm and PyPI. The 1,467 internet-exposed MCP servers Trend Micro counted in October 2025 represent the most attacker-accessible subset, but the total population including internal deployments is substantially larger.
4. Which CVEs are tied to this disclosure?
The April 2026 disclosure produced a cluster of downstream CVEs, including CVE-2025-65720, CVE-2026-30615, CVE-2026-30617, CVE-2026-30618, CVE-2026-30623, CVE-2026-30624, CVE-2026-30625, CVE-2026-33224, and CVE-2026-26015. Each represents a different MCP-host product (LibreChat, WeKnora, and others) where the SDK's configuration channel surfaced an exploitable path. Several are rated Critical (CVSS ≥9.0).
5. Can I keep running MCP servers built on the official SDK?
Yes — but only if you add the sanitisation layer the SDK does not provide. That means pinning SDK versions, allowlisting executable paths, schema-validating arguments before they reach spawn calls, stripping inheritable dangerous environment variables, and sandboxing child processes with kernel-level isolation (containers, seccomp, AppArmor/SELinux). Without these layers, your deployment carries the disclosed exposure unmitigated.
6. How does this fit into OWASP ASI04?
The April 2026 disclosure is the largest-magnitude instance of OWASP ASI04 (Agentic Supply Chain Vulnerabilities) currently on record. It maps to ASI04 because the compromised component is a third-party SDK loaded into the agent runtime, the attack surface is the configuration channel feeding it, and the impact is execution of attacker-controlled code with the host's full authority — exactly the pattern OWASP names.
7. If I'm running MCP only locally on my dev machine, am I still at risk?
Yes — local-only MCP deployments are not safe simply because they are not internet-exposed. Any package in your dependency tree, any IDE extension, any registry-fetched manifest, or any compromised default in an upstream SDK can supply attacker-controlled values to your STDIO spawn call. A local MCP host typically has more interesting credentials than a server (your git tokens, signing keys, AWS credentials) — making developer machines a high-value target rather than a low-risk one.
8. How do I audit my organisation's exposure?
To audit your organisation's exposure, enumerate every spawn-influencing configuration source for every MCP server running on your stack — manifest files, environment variables, package defaults, hosted configuration endpoints. For each source, identify whether anyone other than the operator can write to it. For each writable source, trace the value through the SDK to the spawn primitive and confirm whether sanitisation, allowlisting, or schema validation exists between them. Where it does not, you have a confirmed exploit primitive. Zealynx's MCP Security Audit operationalises this audit against your specific deployment.

Glossary

TermDefinition
Configuration-Channel InjectionAn attack pattern where adversarial values supplied through a configuration source (manifest, environment variable, package default, registry entry) flow into a privileged operation such as a process spawn or shell call without sanitisation.
MCP HostThe application or runtime that connects to MCP servers and embeds them into an AI agent's tool surface — Claude Desktop, Cursor, custom enterprise agent runtimes, or any system that consumes the official MCP SDK.
By-Design VulnerabilityA security-impacting behaviour that the upstream vendor explicitly acknowledges but declines to fix, transferring all mitigation responsibility to downstream operators. The April 2026 Anthropic MCP SDK STDIO config-to-exec pattern is the canonical example.

Are you audit-ready?

Download the free Pre-Audit Readiness Checklist used by 30+ protocols preparing for their first audit.

No spam. Unsubscribe anytime.