What Is AutoJack? Microsoft's security research team has published findings on a critical exploit chain they've dubbed AutoJack โ a technique that transforms an AI browsing agent into a remote code execution vehicle by crossing the localhost trust boundary. The attack targets AutoGen Studio, Microsoft's open-source prototyping interface for its multi-agent framework. By chaining three independent vulnerabilities in the application's MCP (Model Context Protocol) WebSocket surface, an attacker can get arbitrary commands executed on the host machine with no user interaction beyond getting the agent to render a malicious page.
How the Exploit Chain Works AutoJack composes three weaknesses that individually seem minor but combine into a severe primitive. First, the MCP WebSocket only accepts connections from http://127.0.0.1 or http://localhost โ a standard CSWSH defense. That blocks an attacker's browser tab, but it does not block JavaScript executed by a headless browser owned by an AutoGen agent running on the same machine. Second, AuthMiddleware in AutoGen Studio explicitly skips /api/mcp/* paths under the assumption those routes would enforce their own checks โ they didn't. Third, and most critically, the WebSocket handler accepted a server_params query parameter, base64-decoded it into StdioServerParams, and passed command + args directly to stdio_client() with no allowlist. Calc.exe, powershell.exe -enc โฆ, or bash -c 'โฆ' were all accepted as valid MCP servers.
The Confused Deputy Problem in AI Frameworks The core issue is architectural. When an agent equipped with web-browsing tooling also communicates with privileged local services, localhost stops being a trust boundary. An AutoGen agent running MultimodalWebSurfer or any Playwright-backed surfer is a process on the workstation โ anything it loads inherits the localhost identity. The JavaScript on an attacker-controlled page executes with Origin set to localhost, satisfying the WebSocket allowlist check. From there, the attacker supplies a base64-encoded JSON payload like {"command": "calc.exe", "args": [], "env": {}} and the host spawns whatever they want under the developer's account.
Fixes Applied Before Any PyPI Release Microsoft reported the findings to MSRC, and maintainers hardened upstream in commit b047730. The WebSocket handler no longer reads server_params from the URL โ a separate POST /api/mcp/ws/connect route stores parameters server-side keyed by UUID, and the WebSocket rejects unknown session IDs with close code 4004. The auth middleware skip-list was tightened; /api/mcp now flows through normal authentication. These changes landed in AutoGen main branch at version 0.7.2.
Critical Context: This Never Shipped to Users The affected MCP WebSocket route was never included in a PyPI release. Inspecting autogenstudio 0.4.2.2 โ the current published package โ confirms the file autogenstudio/web/routes/mcp.py does not exist, and no matches for StdioServerParams or /api/mcp appear across any of the 55 Python files in the distribution. Users who run pip install autogenstudio today get a build without this attack surface at all. Exposure was limited to developers building from main during the window between the MCP plugin landing and commit b047730.
What This Means for Agent Framework Developers The takeaway is not that AutoGen Studio is dangerous โ it's that the pattern is general. When an agent can both browse external content and reach privileged local services on localhost, it creates a confused-deputy scenario regardless of which framework you're using. Treat any tool parameter reachable from model output as attacker-controlled. Refuse to bind sensitive control planes (debug endpoints, MCP sockets, code executors) to loopback without authentication. Allowlist which executables may be invoked as MCP servers instead of accepting command/args from any caller.
Key Takeaways
- If your agent can browse untrusted pages and reach localhost services, you have an attack surface โ not just with AutoGen Studio but in any framework that combines browsing and privileged tooling
- Auth middleware opt-outs for specific paths are a dangerous pattern; every route needs its own enforcement regardless of middleware skip-lists
- Server-side parameter binding (storing params keyed by UUID rather than passing them through query strings) is the right fix for this class of WebSocket injection
- The exposure from AutoJack was contained because it was caught pre-release โ but similar chains likely exist in other agent prototypes still in development