Malicious MCP Servers Bypass AI Agent Permissions: Inside the GitHub Search Hijack Targeting Cursor and Claude

Security researchers uncover weaponized Model Context Protocol servers running the Beretta stealer during process initialization, completely evading agent-level human approval prompts.

Published: 2026.12.04

GitHub Search Compromise
33.3%

Ranked first in 18 of 54 developer search queries

Payload Detonation Window
7–18 sec

Executes in memory prior to first agent tool invocation

Attacker Wallet Inflow
$49,900

Documented crypto diversion across 23 static addresses

Executive Takeaway ·Because MCP processes execute immediately with host-level user permissions upon agent launch, application-level tool call confirmation dialogs offer zero…

The Initialization-Phase Breach: How MCP Server Spawning Bypasses Agent Security Prompts

Model Context Protocol (MCP) integrations grant AI coding assistants external execution capabilities, database connections, and file access. When a developer registers an MCP server inside an environment like Cursor, Claude Code, or Cline, the agent spawns the underlying binary as a local child process. This process inherits the developer’s full operating system permissions.

A newly documented campaign dubbed MIOU demonstrates a critical architectural vulnerability in how developer tools isolate MCP runtimes. Malicious servers disguised as developer utilities for cryptocurrency exchanges execute an info-stealer named Beretta directly inside a function decorator. The malicious routines fire during the server’s initialization routine, mapping an encrypted binary into memory within 7 to 18 seconds of the host process launching.

Because the operating system executes this code before the AI agent issues its first tool call, interactive confirmation banners fail to intercept the payload. Security models that rely on user confirmation dialogs before invoking tools operate strictly at the application layer. By targeting the initialization handshake between the agent host and the local sub-process, the attack renders agent-level permission prompts structurally useless.

Execution Timeline of Weaponized MCP Server Initialization

Malware detonation occurs prior to the agent tool-approval boundary

01 · Step 01
Agent Process Registration

Developer points Cursor or Claude to a cloned repository containing a malicious MCP entry point.

02 · Step 02
Pre-Execution Hook Fires

A decorator executes during Python/Node server bootstrap, inheriting standard OS user privileges.

03 · Step 03
In-Memory Payload Decryption

Within 7–18 seconds, an encrypted payload drops a COM-hijacking binary disguised as an Edge WebView component.

04 · Step 04
Dead Security Checkpoint

User-facing 'Approve tool execution?' prompts appear only after host environment compromise is complete.

Anatomy of the MIOU Campaign: Bot Farm Manipulation and the Beretta Stealer

The threat actors distributed the malware by manipulating GitHub repository ranking algorithms. Rather than relying on typosquatting package registries such as npm or PyPI, the group established 36 public repositories masquerading as portfolio trackers and trading bots for Lighter and Aster. The campaign deployed automated bot farms to simulate organic engagement and elevate the repositories across developer search queries.

Of 1,319 GitHub accounts interacting with the repositories, 1,222 were bot profiles created in coordinated batches. Automated scripts generated 26,407 of the 26,511 recorded commits, creating artificial commit frequency and star velocity. This artificial activity pushed the malicious repositories to the top search position in 33.3% of targeted queries (18 out of 54 search variations tested by researchers).

The primary payload, identified as Beretta, deploys custom cryptographic routines and configuration formatting distinct from commercial stealers like StealC. Once resident in memory, Beretta alters Windows Component Object Model (COM) interfaces by disguising its executable as an Edge WebView component. It maintains a persistent clipboard hijacker configured with 23 hardcoded cryptocurrency addresses, diverting transactions when developers copy addresses into desktop wallets or web browsers. Attacker-controlled wallets absorbed approximately $49,900 in diverted transactions between February and November.

MIOU Operational Footprint and Artificial SEO Telemetry

Telemetry extracted from 36 malicious repositories analyzed by Apiiro

01
Synthetic GitHub Accounts

1,222 out of 1,319 total interacting accounts originated from coordinated bot farms.

92.6%
02
Automated Commits

26,407 bot commits manufactured continuous developer activity signals.

99.6%
03
Clipboard Hijacking Targets

Hardcoded destination addresses monitored and diverted outbound wallet transfers.

23 Addresses

Structural Blind Spots in Enterprise AppSec: Why Repository-Cloned MCPs Evade Scanners

Enterprise application security pipelines primarily inspect third-party dependencies through Software Composition Analysis (SCA) scanners connected to formal registries. When an engineer installs a package from PyPI, npm, or crates.io, automated pipeline scanners parse lockfiles (package-lock.json, poetry.lock) to cross-reference known Vulnerabilities and Exposures (CVEs) and scan for malicious maintainer updates.

Repository-cloned MCP servers bypass this detection boundary entirely. Because developers register MCP endpoints via direct Git clones (git clone followed by pointing the agent configuration JSON to a local executable or script), security telemetry pipelines never receive an installation event from a central artifact repository.

Metric & Architectural LayerStandard Registry Dependency (npm / PyPI)Direct Git-Cloned MCP Server
SCA Telemetry VisibilityImmediate via lockfile tracking and manifest parsingZero visibility; treated as local unmanaged source code
Execution Permission ContextPackage post-install scripts or runtime invocationInherits host developer user account permissions
Interception MechanismRegistry quarantine, hash matching, lockfile pinningHost-based Endpoint Detection and Response (EDR) only
Static Analysis CoveragePre-commit hooks, CI/CD static security scannersUnaudited if executed exclusively on local workstations
Execution TriggerApplication runtime invocationServer initialization decorator on agent launch
Bypass SurfaceTyposquatting, compromised maintainer credentialsGitHub search algorithm manipulation and bot commit farming

This delivery mechanism introduces a profound gap between developer workstation flexibility and enterprise compliance controls. Removing the cloned directory from the filesystem does not remediate an infection. Because Beretta modifies Windows COM registry entries and establishes persistent background processes, remediation requires full endpoint containment, credential revocation, and wallet migration from an isolated device.

Enterprise Containment and Runtime Isolation Architecture for AI Agents

Protecting enterprise environments from weaponized MCP infrastructure requires shifting trust boundaries from application-level confirmations to strict process isolation. Relying on an engineer to vet hundreds of lines of initialization logic before adding an MCP server to an agent configuration file is an unviable security strategy.

Host Execution vs. Isolated Container Execution for MCP Tools

Architectural boundaries dictate exposure to initialization exploits

High Risk
Direct Host Execution (Vulnerable)
  • • Runs directly inside developer user session and OS environment
  • • Initialization code can modify host COM objects and clipboard
  • • Accesses unencrypted local keys, shell histories, and credentials
Zero-Trust Sandbox
Micro-VM / Rootless Container (Hardened)
  • • MCP server spawns inside an ephemeral container or gVisor sandbox
  • • No access to host clipboard, OS registry, or host-level network sockets
  • • Execution terminates immediately upon agent process shutdown
Verdict ·MCP runtimes must be isolated within unprivileged, network-restricted containers that disallow host clipboard and system configuration mutations.

Engineering organizations deploying AI coding agents must implement three mandatory controls to insulate developer workstations:

  • Enforce Containerized MCP Runtimes: Never execute third-party MCP servers directly on bare-metal workstations. Configure Cursor and Claude integrations to spawn MCP processes exclusively within unprivileged Docker containers, rootless Podman instances, or lightweight micro-VMs. Restrict mounted volumes to the specific project directory, explicitly excluding the host filesystem, user profile, and SSH/GPG directories.
  • Implement Egress Filtering and Clipboard Sandboxing: Bind MCP execution sandboxes to isolated network namespaces. Prevent outbound connections unless the server explicitly requires external API access, and block access to host inter-process communication (IPC) channels. The container must have no programmatic interface to the host operating system clipboard or Windows COM subsystems.
  • Audit Local Agent Configuration Manifests: Security teams must treat local agent configurations (such as claude_desktop_config.json or editor settings) as monitored configuration items. Deploy endpoint compliance scripts to detect newly registered command-line executables and flag unvetted GitHub repositories operating as MCP backends before execution starts.

Related Benchmark Reports

View All in Category →
Weekly Briefing

Weekly Tech & Business Data Briefing

Verified software analysis, practical gotchas, and essential supply-chain updates delivered weekly.

Unsubscribe with 1 click anytime. Zero spam.

* We may earn an affiliate commission from links in this report, at no extra cost to you and with zero impact on our benchmark data.