Executive Summary
In late September 2026, a critical remote code execution vulnerability (severity 9.8/10) was discovered in OpenCode, an AI coding agent developed by Anomaly. The flaw allowed a malicious or compromised MCP (Model Context Protocol) server to execute arbitrary code on a developer's Windows or WSL machine during the OAuth sign-in flow. OpenCode passed the server-supplied authorization endpoint URL to a PowerShell-based browser-launch helper without sanitizing it, enabling command injection. Affecting versions 1.0.137 through 1.18.32, the bug was silently patched in version 1.18.33 on September 28, 2026, without a CVE assignment or public advisory, leaving many installations unknowingly exposed.
This incident underscores the expanding attack surface introduced by AI agent ecosystems and MCP server integrations. As agentic AI tooling proliferates in developer workflows, supply-chain and third-party plugin compromises represent a growing vector. The absence of a CVE means automated scanners cannot flag affected versions, amplifying organizational risk and highlighting gaps in AI-era software disclosure practices.
Why This Matters Now
AI coding agents like OpenCode are now embedded in developer pipelines at scale, and MCP server ecosystems are rapidly expanding with third-party integrations that organizations rarely vet. The silent patch—no CVE, no advisory—means enterprise security teams cannot rely on standard vulnerability management tooling to identify exposed systems. With a severity score of 9.8 and no indicators of compromise published, organizations must audit AI agent configurations manually and urgently.
Attack Path Analysis
An attacker gained control of a remote MCP server that a developer had configured in OpenCode, then poisoned the OAuth authorization endpoint URL with an embedded PowerShell command. When the developer initiated sign-in on Windows or WSL, OpenCode's unescaped browser-helper passed the malicious URL directly to PowerShell, executing arbitrary code with the developer's own privileges — enabling code execution, potential credential harvesting, lateral movement across the developer's environment, and exfiltration of secrets such as API keys.
Kill Chain Progression
This analysis maps confirmed threat intelligence to the full cloud kill chain to show where defensive gaps would emerge as an attack progresses.
Initial Compromise
Description
The attacker took over or registered a remote MCP server that a developer had previously added to their OpenCode configuration. By controlling the MCP server, the attacker crafted a malicious OAuth authorization endpoint URL containing an embedded PowerShell command. When the developer ran 'opencode mcp auth' or triggered sign-in, OpenCode's browser-helper (the 'open' npm package, pre-v11) passed the unescaped URL directly to a PowerShell command constructor on Windows/WSL, executing the injected payload with the developer's credentials — a classic supply-chain/MCP server hijack leading to remote code execution (CVSS 9.8, no CVE assigned).
MITRE ATT&CK® Techniques
Supply Chain Compromise: Compromise Software Dependencies and Development Tools
Command and Scripting Interpreter: PowerShell
User Execution: Malicious File
Phishing: Spearphishing Link
Valid Accounts
Subvert Trust Controls
System Services: Service Execution
Exploit Public-Facing Application
Potential Compliance Exposure
Mapping incident impact across multiple compliance frameworks.
NIST SP 800-53 Rev 5 – Information Input Validation
Control ID: SI-10
CISA Zero Trust Maturity Model 2.0 – Third-Party Integration Trust Boundaries
Control ID: Application Pillar – Application Access
NIS2 Directive – Supply Chain Security and Vulnerability Disclosure
Control ID: Article 21(2)(a) and 21(2)(h)
DORA (Digital Operational Resilience Act) – Third-Party ICT Service Provider Risk Controls
Control ID: Article 28 – ICT Third-Party Risk Management
PCI DSS 4.0 – Security Patching and Vulnerability Remediation
Control ID: Requirement 6.3.3
ISO/IEC 27001:2022 – Technical Vulnerability Management and Disclosure
Control ID: Annex A 8.8 – Management of Technical Vulnerabilities
Sector Implications
Industry-specific impact of the vulnerabilities, including operational, regulatory, and cloud security risks.
Computer Software/Engineering
Developer toolchain supply-chain attack via malicious MCP OAuth endpoints enables RCE on Windows/WSL, bypassing egress controls and threatening CI/CD pipelines with critical 9.8-severity code execution without CVE visibility.
Information Technology/IT
AI agent exploitation through hijacked MCP servers exposes IT teams running OpenCode to lateral movement and exfiltration risks, with no scanner detection due to absent CVE assignment across versions 1.0.137–1.18.32.
Computer/Network Security
MCP OAuth injection flaw undermines zero-trust segmentation and CNSF enforcement, exposing security tooling workflows to prompt-injection-class supply-chain compromise with NIST.800-53.SI-4 and ZTMM compliance gaps.
Financial Services
Concurrent OpenCode Console breach potentially exposing stored OpenAI and Anthropic API keys heightens PCI 4.0 and ZTMM data exfiltration risk for financial services teams using AI-assisted development workflows.
Sources
- OpenCode Flaw Lets Malicious MCP Servers Execute Code During Sign-In on Windows and WSLhttps://thehackernews.com/2026/10/opencode-flaw-lets-malicious-mcp.htmlVerified
- Open and Shut: Remote Code Execution in OpenCode via MCP OAuth - Pillar Security Researchhttps://www.pillar.security/blog/open-and-shut-remote-code-execution-in-opencode-via-mcp-oauthVerified
- OpenCode Release v1.18.33 - Anomaly GitHubhttps://github.com/anomalyco/opencode/releases/tag/v1.18.33Verified
- OpenCode Pull Request #51414 - Browser Launch Refactor (Security Fix)https://github.com/anomalyco/opencode/pull/51414Verified
- OpenCode Security Policyhttps://github.com/anomalyco/opencode/securityVerified
- Critical mcp-remote Vulnerability (CVE-2025-6514) - The Hacker Newshttps://thehackernews.com/2025/07/critical-mcp-remote-vulnerability.htmlVerified
- sindresorhus/open - Command Injection Risk on Windows (Issue #323)https://github.com/sindresorhus/open/issues/323Verified
- OpenCode Console Breach May Have Exposed Stored API Keyshttps://thehackernews.com/2026/10/opencode-console-breach-may-have.htmlVerified
Frequently Asked Questions
Cloud Native Security Fabric Mitigations and ControlsCNSF
Based on the attack progression modeled above, these are the defensive controls that would constrain each stage.
Aviatrix Zero Trust CNSF is directly relevant here because the attacker's ability to move from a compromised developer workstation into cloud environments and internal infrastructure depends entirely on unrestricted east-west and egress paths that segmentation-aware controls can constrain. By enforcing identity-scoped access boundaries and limiting outbound connectivity from developer workloads, CNSF would likely reduce the blast radius of the initial MCP server hijack before harvested credentials could be weaponized at scale.
Control: Cloud Native Security Fabric (CNSF)
Mitigation: CNSF fabric-level visibility into workload-to-external-endpoint communication could likely reduce the reachability of untrusted or newly registered MCP server destinations from within the developer's cloud-connected environment, constraining the initial delivery surface before the malicious OAuth callback is ever resolved.
Control: Zero Trust Segmentation
Mitigation: Zero Trust segmentation would likely constrain how far the compromised developer identity's cloud credentials could reach across segmented workload boundaries, reducing the scope of cloud-side privilege available to an attacker operating from a hijacked workstation session.
Control: East-West Traffic Security
Mitigation: East-west traffic enforcement would likely reduce the reachability of cloud workloads and internal developer infrastructure from a compromised workstation identity, constraining lateral paths that depend on implicit trust relationships between developer endpoints and cloud-resident systems.
Control: Multicloud Visibility & Control
Mitigation: Multicloud visibility across outbound connection paths would likely surface anomalous HTTPS beaconing or unexpected FQDN destinations originating from developer workload segments, reducing the window during which C2 channels could operate undetected within the cloud-connected environment.
Control: Egress Security & Policy Enforcement
Mitigation: Egress policy enforcement on outbound paths from developer workload segments would likely constrain data exfiltration attempts to attacker-controlled destinations, reducing the volume and variety of sensitive credentials that could be transmitted before an anomalous egress pattern is identified and acted upon.
Residual impact would likely be narrowed to assets already resident on the compromised workstation at the moment of initial code execution, with downstream cloud abuse and supply-chain consequences constrained by the reduced credential reach that earlier segmentation and egress enforcement would have imposed on the attacker's operational scope.
Impact at a Glance
Affected Business Functions
- Software Development Pipelines and CI/CD Workflows
- Developer Workstation Integrity and Endpoint Security
- AI Agent and MCP Server Supply Chain Trust
- Source Code Confidentiality and Intellectual Property Protection
Estimated downtime: N/A
Estimated loss: N/A
The vulnerability enables arbitrary code execution on a developer's Windows or WSL machine with the developer's own privilege level at the moment of MCP OAuth sign-in. Potential data at risk includes source code repositories, locally stored credentials and API keys, environment variable secrets, SSH and signing keys, access tokens for cloud platforms, and any data accessible to the developer's OS account. The concurrent OpenCode Console breach separately exposed stored API keys for OpenAI, Anthropic, and Google for an unspecified subset of users. No confirmed exploitation of the RCE flaw has been reported and no indicators of compromise were published by Pillar Security. The absence of a CVE means automated vulnerability scanners and dependency alert systems will not surface affected installs (versions 1.0.137 through 1.18.32), increasing residual exposure risk across organizations that have not manually verified their OpenCode version.
Recommended Actions
Key Takeaways & Next Steps
- • Deploy Cloud Native Security Fabric (CNSF) inline enforcement for AI agent traffic: MCP server communications and OAuth redirect flows initiated by AI coding agents like OpenCode should be subject to real-time inspection and policy enforcement. CNSF controls aligned with ZTMM.CrossCutting.Automation and NIST.800-53.SI-4 can detect anomalous interactions, malformed authorization endpoints, and suspicious agentic AI behavior before code execution occurs.
- • Enforce egress security and FQDN-based policy for developer workstations and CI/CD environments: Use Egress Security & Policy Enforcement controls to restrict outbound connections from developer machines and build pipelines to only approved MCP server domains and OAuth endpoints. Unauthorized or newly-registered FQDN destinations attempted by PowerShell or shell processes should trigger immediate alerts and blocks, aligned with ZTMM.Data and NIST.CSF.PR.DS-5.
- • Apply Zero Trust Segmentation to isolate developer workstations from cloud control planes: Implement identity-based microsegmentation so that even if a developer workstation is compromised, lateral movement to cloud credentials stores, CI/CD pipelines, and production cloud environments is blocked by policy. Least-privilege SmartGroups and namespace enforcement (ZTMM.Network, NIST.800-53.AC-6) prevent harvested tokens from being usable for cross-environment pivoting.
- • Enable Multicloud Visibility & Control to detect anomalous MCP and OAuth traffic patterns: Centralized traffic observability across hybrid and multi-cloud environments should baseline normal MCP server interaction patterns and alert on repeated malformed OAuth requests or unexpected PowerShell-initiated browser-launch events. This maps to ZTMM.CrossCutting.Visibility and NIST.800-53.AU-6, providing the detection layer absent from scanner-based approaches that rely on CVE assignment.
- • Require vetting and allowlisting of MCP server endpoints via Cloud Firewall (ACF) with URL filtering: All MCP server OAuth authorization endpoints should be pre-approved via cloud firewall policy with URL and FQDN filtering before OpenCode or similar AI agents are permitted to interact with them. Any attempt to redirect authentication flows to non-allowlisted endpoints should be blocked and logged, aligned with ZTMM.Network, PCI.4.0.6.4.3, and NIST.CSF.DE.CM-8, closing the trust-boundary gap that Anomaly explicitly excluded from its threat model.



