# AutoJack: AutoGen Studio MCP WebSocket Exploit Chain Turns an AI Browsing Agent into a Host RCE Vector

> Microsoft Defender Security Research disclosed AutoJack, a three-bug exploit chain in AutoGen Studio's MCP WebSocket that lets a single malicious web page, when rendered by a local AI browsing agent, reach the agent's localhost control channel and spawn arbitrary commands on the host. The chain combines a localhost-trusting origin allowlist (CWE-1385), an authentication middleware that opts MCP paths out of auth (CWE-306), and a command endpoint that runs an executable taken straight from a URL parameter (CWE-78). Demonstrated as a proof of concept (calc.exe pop); no exploitation in the wild and no CVE assigned.

- **Published:** 2026-06-19T00:00:00Z
- **Last reviewed:** 2026-06-19T00:00:00Z
- **Canonical:** https://intel.threadlinqs.com/threat/TL-2026-0873
- **Card image:** https://intel.threadlinqs.com/og/threat/threat-intel-autojack-browsing-agent-rce-tl-2026-0873.webp?v=abad4e27 (Threadlinqs threat intel: AutoJack AutoGen Browsing Agent RCE: Detection & IOCs (TL-2026-0873) — High severity, 21 IOCs, 9 detection rules.)
- **ID:** TL-2026-0873
- **Severity:** HIGH
- **Category:** VULNERABILITY
- **Status:** MONITORING
- **Detections:** 9 (1 shown free below) · **IOCs:** 21

## Description

AutoJack is an exploit chain disclosed by Microsoft on June 18, 2026 that demonstrates how an AI browsing agent can be coerced into becoming the attacker's last-mile remote-code-execution delivery vehicle. The target is AutoGen Studio, the low-code UI for Microsoft Research's AutoGen multi-agent framework. AutoGen Studio runs a local web service (default http://localhost:8081) and, in affected development builds on the main branch, exposed a Model Context Protocol (MCP) WebSocket control channel under /api/mcp/ws/.

The attack chains three independent weaknesses. First (CWE-1385, Missing Origin Validation), the MCP WebSocket enforced an origin allowlist that trusted http://127.0.0.1 and http://localhost. That check is meant to stop an ordinary remote browser pointed at a malicious site, but an AutoGen browsing agent (MultimodalWebSurfer) runs a headless browser on the same host, so any page it loads inherits the localhost identity and satisfies the origin check. Second (CWE-306, Missing Authentication), the AuthMiddleware contained an early-return skip-list for WebSocket-style paths including /api/ws and /api/mcp, on the assumption that the MCP handler would verify tokens itself; the handler never implemented that follow-up check, so the socket accepted unauthenticated connections regardless of the configured authentication mode. Third (CWE-78, OS Command Injection), the WebSocket endpoint accepted a base64-encoded server_params query parameter, decoded it into a StdioServerParams object, and passed the resulting command and args directly to stdio_client(...) with no allowlist on which executable could launch.

The end-to-end flow: a developer runs AutoGen Studio with a browsing agent on localhost:8081; an attacker plants a malicious page on the internet (or injects a URL into the agent prompt); the agent's MultimodalWebSurfer navigates a headless browser to the attacker page; the page's JavaScript opens ws://localhost:8081/api/mcp/ws/?server_params=<base64>; AutoGen Studio decodes the base64 JSON into StdioServerParams and spawns the requested command (e.g., calc.exe or powershell.exe) under the developer's account. Microsoft's proof of concept used a 'Web Content Summarizer' agent that, when fed an attacker URL, pops calc.exe on the developer's desktop.

Microsoft reported the behavior to the Microsoft Security Response Center (MSRC); the maintainers hardened the upstream main branch in commit b047730 (PR #7362). The fix stops reading the command from the URL: parameters are now stored server-side behind a one-time session ID via a new POST /api/mcp/ws/connect route, unknown IDs are refused, and MCP routes now flow through the normal authentication path (the middleware no longer exempts /api/mcp). Microsoft states the vulnerable MCP WebSocket surface was never included in a PyPI release, so the current PyPI build (0.4.2.2, which does not include autogenstudio/web/routes/mcp.py) is not exposed to this specific chain. The originating hunt and The Hacker News reporting note the dev pre-releases 0.4.3.dev1 and 0.4.3.dev2 on PyPI and that neither build was yanked; sources differ on whether the vulnerable route reached a packaged pre-release, so source installs and dev builds tracking main during the affected window should be treated as the at-risk population. Microsoft emphasizes the broader lesson: when an agent on your machine can browse the open web and talk to privileged local services, localhost stops being a trust boundary; the pattern is broader than this single bug.

## MITRE ATT&CK

- T1608 Stage Capabilities
- T1583 Acquire Infrastructure
- T1587 Develop Capabilities
- T1189 Drive-by Compromise
- T1659 Content Injection
- T1199 Trusted Relationship
- T1190 Exploit Public-Facing Application
- T1203 Exploitation for Client Execution
- T1059 Command and Scripting Interpreter
- T1106 Native API
- T1559 Inter-Process Communication
- T1211 Exploitation for Stealth
- T1036 Masquerading
- T1071 Application Layer Protocol
- T1571 Non-Standard Port
- T1132 Data Encoding

## Free detection (Splunk SPL, Microsoft KQL, Sigma)

**AutoJack Exploitation — MCP WebSocket to localhost:8081 carrying server_params (SPL)** (`TL-2026-0873-SPL-001`)

Detects the AutoJack entry point: a WebSocket/HTTP upgrade request to the AutoGen Studio MCP control channel /api/mcp/ws/ on localhost:8081 that carries a base64 server_params query parameter. This is the chained CWE-1385 (localhost origin allowlist defeated by the on-host browsing agent) + CWE-306 (AuthMiddleware skip-list) + CWE-78 (server_params decoded into StdioServerParams and spawned) entry vector. Post-patch flows use POST /api/mcp/ws/connect with a one-time session ID and never carry inline server_params, so an inline server_params on the legacy path is a strong indicator.

- **Languages:** Splunk SPL, Microsoft KQL, Sigma
- **ATT&CK:** T1190, T1189, T1659, T1132.001
- **Data sources:** proxy, stream:http, DeviceNetworkEvents, suricata
- **Severity:** high
- **Confidence:** high

### Splunk SPL

```spl
index=proxy OR index=web sourcetype IN ("stream:http","pan:traffic","cisco:wsa:w3c","suricata")
| eval uri=coalesce(uri_path,url,cs_uri_stem,c_uri)
| eval q=coalesce(uri_query,url,cs_uri_query,c_uri_query)
| search (dest_port=8081 OR dest="127.0.0.1" OR dest="localhost" OR dest="::1")
| search uri="*/api/mcp/ws/*" AND q="*server_params=*"
| where NOT match(uri, "/api/mcp/ws/connect")
| rex field=q "server_params=(?<b64_params>[A-Za-z0-9+/=%]+)"
| stats count min(_time) as first_seen max(_time) as last_seen values(uri) as uri values(src) as src by dest dest_port
| eval reason="AutoJack: inline base64 server_params on legacy MCP WebSocket path (CWE-1385/306/78)"
```

### Microsoft KQL

```kql
// Sentinel: MCP WebSocket entry point carrying server_params to AutoGen Studio
let lookback = 24h;
DeviceNetworkEvents
| where Timestamp > ago(lookback)
| where RemotePort == 8081 or RemoteUrl has "localhost:8081" or RemoteUrl has "127.0.0.1:8081"
| where RemoteUrl has "/api/mcp/ws/" and RemoteUrl has "server_params="
| where RemoteUrl !has "/api/mcp/ws/connect"
| project Timestamp, DeviceName, InitiatingProcessFileName, InitiatingProcessCommandLine, RemoteUrl, RemoteIP, RemotePort
| extend Reason = "AutoJack inline server_params on legacy MCP WebSocket (CWE-1385/306/78)"
```

### Sigma

```yaml
title: AutoJack MCP WebSocket Request Carrying server_params to localhost:8081
id: f1a0c873-1001-4a01-9b10-autojackspl001
status: experimental
description: Detects WebSocket/HTTP requests to the AutoGen Studio MCP control channel /api/mcp/ws/ on port 8081 carrying an inline base64 server_params parameter (AutoJack CWE-1385/CWE-306/CWE-78 entry point).
references:
    - https://www.microsoft.com/en-us/security/blog/2026/06/18/autojack-single-page-rce-host-running-ai-agent/
    - https://github.com/microsoft/autogen/pull/7362
author: Threadlinqs Team
date: 2026/06/19
tags:
    - attack.initial_access
    - attack.t1190
    - attack.t1189
    - attack.t1659
    - cwe.2026.1385
logsource:
    category: proxy
detection:
    selection:
        c-uri|contains:
            - '/api/mcp/ws/'
        c-uri|contains: 'server_params='
    selection_port:
        dest_port: 8081
    filter_patched:
        c-uri|contains: '/api/mcp/ws/connect'
    condition: selection and selection_port and not filter_patched
falsepositives:
    - Post-patch /api/mcp/ws/connect session flows (no inline server_params)
level: high
```

**Known false positives:**

- Post-patch POST /api/mcp/ws/connect session-ID flows that carry no inline server_params
- Developer/QA testing of the MCP WebSocket route in a controlled lab

**Tuning notes:** Scope to known AutoGen Studio developer workstations and the default port 8081 (adjust if bound elsewhere). Exclude the post-patch /api/mcp/ws/connect path. If proxy logs lack the query string, pivot to host network telemetry (Sysmon EID 3 / DeviceNetworkEvents) for connections to 8081 from python/headless-browser processes.

### 8 more detection rules (Splunk SPL, Microsoft KQL, Sigma), unlock with TL Creds

- AutoJack Exploitation — Unauthenticated MCP WebSocket Accept with server_params (KQL) (locked: unlock with TL Creds)
- AutoJack Post-Exploitation — AutoGen Runtime Spawns Interpreter with pwned Env Marker (KQL) (locked: unlock with TL Creds)
- AutoJack Delivery — MultimodalWebSurfer Headless Browse to Untrusted Domain (KQL) (locked: unlock with TL Creds)
- AutoJack Exploitation — base64 StdioServerParams on MCP WebSocket (Sigma) (locked: unlock with TL Creds)
- AutoJack Post-Exploitation — Interpreter Spawn from AutoGen Runtime on Linux (Sigma) (locked: unlock with TL Creds)
- AutoJack Auth/Origin Bypass — Unauthenticated /api/mcp WebSocket Accept (Sigma) (locked: unlock with TL Creds)
- AutoJack Post-Exploitation — Anomalous Child Process of AutoGen Studio Runtime (SPL) (locked: unlock with TL Creds)
- AutoJack C2/Delivery — Browsing Agent to Untrusted Domain then Localhost MCP Callback (SPL) (locked: unlock with TL Creds)

Sign up free to unlock the detection rules: https://threadlinqs.com/?modal=signup

## Sources

- [AutoJack: How a single page can RCE the host running your AI agent](https://www.microsoft.com/en-us/security/blog/2026/06/18/autojack-single-page-rce-host-running-ai-agent/)
- [AutoJack Attack Lets One Web Page Turn an AI Browsing Agent into an RCE Vector](https://thehackernews.com/2026/06/autojack-attack-lets-one-web-page.html)
- [Microsoft says web-enabled AI agents can trigger host-level RCE](https://www.csoonline.com/article/4187155/microsoft-says-web-enabled-ai-agents-can-trigger-host-level-rce.html)
- [Microsoft warns AI agents are being 'AutoJack'-ed to deliver RCE payloads by browsing untrusted websites](https://www.techradar.com/pro/security/microsoft-warns-ai-agents-are-being-autojack-ed-to-deliver-rce-payloads-by-browsing-untrusted-websites)
- [Microsoft Discloses AutoJack: A Malicious Webpage Can Hijack AutoGen Studio via Localhost RCE](https://windowsnews.ai/article/microsoft-discloses-autojack-a-malicious-webpage-can-hijack-autogen-studio-via-localhost-rce.428000)
- [CWE-1385: Missing Origin Validation in WebSockets](https://cwe.mitre.org/data/definitions/1385.html)
- [CWE-306: Missing Authentication for Critical Function](https://cwe.mitre.org/data/definitions/306.html)
- [CWE-78: Improper Neutralization of Special Elements used in an OS Command (OS Command Injection)](https://cwe.mitre.org/data/definitions/78.html)
- [AutoGen Studio fix: bind MCP server_params server-side behind a one-time session ID (PR #7362)](https://github.com/microsoft/autogen/pull/7362)
- [AutoGen Studio hardening commit b047730 (MCP routes flow through normal auth)](https://github.com/microsoft/autogen/commit/b047730)
- [Microsoft AutoGen — multi-agent framework repository](https://github.com/microsoft/autogen)
- [AutoGen Studio on PyPI (stable 0.4.2.2)](https://pypi.org/project/autogenstudio/)

## Full data

The other 8 detection rules (Splunk SPL / Microsoft KQL / Sigma) unlock with TL Creds; a free account includes daily creds: https://threadlinqs.com/?modal=signup
Indicator values unlock with TL Creds, at a lower price on Red and Purple; AI agents can query rules and IOCs through the Threadlinqs MCP server (Purple): https://intel.threadlinqs.com/mcp

Canonical: https://intel.threadlinqs.com/threat/TL-2026-0873
