# AutoJack: Single-Page RCE Against Hosts Running AI Agents (AutoGen Studio MCP WebSocket Confused-Deputy Chain)

> AutoJack is a Microsoft-documented exploit chain in AutoGen Studio in which a single untrusted web page, rendered by an AutoGen browsing agent, reaches the local Model Context Protocol (MCP) WebSocket and spawns arbitrary host processes. The browsing agent is abused as a confused deputy to cross the localhost trust boundary and achieve remote code execution.

- **Published:** 2026-06-18T00:00:00Z
- **Last reviewed:** 2026-06-18T00:00:00Z
- **Canonical:** https://intel.threadlinqs.com/threat/TL-2026-0862
- **Card image:** https://intel.threadlinqs.com/og/threat/threat-intel-autojack-autogen-mcp-takeover-tl-2026-0862.webp?v=c29ebb15 (Threadlinqs threat intel: AutoJack AutoGen Studio Confused Deputy: Analysis & Hunting (TL-2026-0862) — High severity, 19 IOCs, 9 detection rules.)
- **ID:** TL-2026-0862
- **Severity:** HIGH
- **Category:** VULNERABILITY
- **Status:** PATCHED
- **Detections:** 9 (1 shown free below) · **IOCs:** 19

## Description

Microsoft Defender Security Research disclosed AutoJack, a three-vulnerability chain that turns an AI agent framework into a single-page remote code execution (RCE) primitive. The target is AutoGen Studio, the low-code multi-agent prototyping UI built on Microsoft's AutoGen framework. The chain weaponizes an AutoGen browsing agent (e.g., MultimodalWebSurfer / Playwright-driven web surfer) as a confused deputy: when the agent is instructed to visit an attacker-controlled page, the JavaScript on that page executes within a browser context that inherits the host's localhost origin, allowing it to reach loopback-only services that assume same-origin requests are trustworthy.

The first link is an origin-allowlist bypass (CWE-1385, Missing Origin Validation in WebSockets): the AutoGen Studio MCP WebSocket accepts connections whose Origin is http://127.0.0.1 or http://localhost, but content rendered by the local browsing agent inherits exactly that origin, defeating the check. The second link is missing authentication (CWE-306, Missing Authentication for Critical Function): the application's auth middleware explicitly skips paths matching /api/mcp/* and /api/ws/* on the assumption those handlers enforce their own authentication, but the MCP WebSocket handler never did, so the endpoint is reachable without credentials regardless of the configured auth mode (github, msal, or firebase). The third link is command injection (CWE-78, OS Command Injection): the WebSocket endpoint accepts a server_params query parameter holding base64-encoded JSON that is deserialized directly into a StdioServerParams object with no command allowlisting, so an attacker supplies an arbitrary command to execute. A demonstration payload of {"type":"StdioServerParams","command":"calc.exe","args":[],"env":{"pwned":"true"}} launches calc.exe on the host; any executable and arguments can be substituted.

The end-to-end flow: the operator's browsing agent is steered (via prompt injection embedded in the page or task) to a malicious URL; the page's JavaScript scans loopback ports, opens ws://localhost:8081/api/mcp/ws/?server_params=<base64> to the unauthenticated MCP socket, and the server decodes the parameters and spawns the attacker-chosen process as a stdio MCP server — full RCE in the context of the AutoGen Studio process.

Scope is narrow and the issue was never shipped: only development builds from the AutoGen repository main branch, between the MCP plugin landing and the hardening commit, contain the vulnerable /api/mcp/ws route. Published PyPI releases (current 0.4.2.2 at disclosure) do not include the MCP WebSocket route and are not affected. Microsoft states the chain was identified and remediated before any vulnerable code reached a PyPI release, and it was not exploited in the wild. The fix (commit b047730) introduces server-side parameter binding — a POST to /api/mcp/ws/connect stores parameters server-side under a UUID so they can no longer be injected through the URL — and tightens the middleware skip list so /api/mcp no longer bypasses authentication. AutoJack is documented here as a novel agentic-RCE TTP warranting detection guidance even absent in-the-wild exploitation.

## MITRE ATT&CK

- T1608 Stage Capabilities
- T1583 Acquire Infrastructure
- T1189 Drive-by Compromise
- T1190 Exploit Public-Facing Application
- T1566 Phishing
- T1046 Network Service Discovery
- T1684.001 Impersonation
- T1203 Exploitation for Client Execution
- T1059 Command and Scripting Interpreter
- T1106 Native API
- T1559 Inter-Process Communication
- T1021 Remote Services

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

**AutoGen Studio Spawning Shell / LOLBin Child with pwned Env Marker — Post-Exploitation** (`TL-2026-0862-SPL-002`)

Detects the AutoJack RCE end-state: an autogenstudio process spawning a shell, scripting host, or download utility (cmd.exe, powershell.exe, pwsh.exe, calc.exe, curl.exe, bash, sh) as a direct child — the decoded StdioServerParams.command running on the host (CWE-78). Boosts confidence when the child environment carries the PoC marker pwned=true. This is arbitrary process execution in the context of the AutoGen Studio process.

- **Languages:** Splunk SPL, Microsoft KQL, Sigma
- **ATT&CK:** T1203, T1059.001, T1059.003, T1059.004, T1059.006, T1106
- **Data sources:** sysmon, windows_security, edr_process_telemetry, auditd
- **Severity:** critical
- **Confidence:** high

### Splunk SPL

```spl
index=sysmon sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=1
| eval parent=lower(coalesce(ParentImage, parent_process)), child=lower(Image), pcl=lower(ParentCommandLine)
| where (like(parent, "%autogenstudio%") OR like(pcl, "%autogenstudio%"))
| where match(child, "\\\\(cmd|powershell|pwsh|calc|curl|wscript|cscript|mshta|bash|sh)\\.exe$") OR match(child, "/(bash|sh|curl|python3?)$")
| eval pwned_marker=if(match(lower(CommandLine), "pwned") OR match(lower(_raw), "pwned=true"), "yes", "no")
| stats count min(_time) as first_seen max(_time) as last_seen values(child) as child_images values(CommandLine) as cmdlines by host ParentImage pwned_marker
| convert ctime(first_seen) ctime(last_seen)
| eval risk="AutoJack confused-deputy command injection end-state (RCE)"
| table host ParentImage child_images cmdlines pwned_marker count first_seen last_seen risk
```

### Microsoft KQL

```kql
// Sentinel: AutoGen Studio spawning shell/LOLBin children (AutoJack RCE end-state)
let lookback = 24h;
DeviceProcessEvents
| where Timestamp > ago(lookback)
| where InitiatingProcessFileName has "autogenstudio" or InitiatingProcessCommandLine has "autogenstudio"
| where FileName in~ ("cmd.exe","powershell.exe","pwsh.exe","calc.exe","curl.exe","wscript.exe","cscript.exe","mshta.exe","bash","sh","python3")
| extend PwnedMarker = iff(ProcessCommandLine has "pwned", "yes", "no")
| project Timestamp, DeviceName, InitiatingProcessFileName, FileName, ProcessCommandLine, PwnedMarker, AccountName
| extend Technique = "T1203/T1059/T1106", Threat = "AutoJack RCE child process"
```

### Sigma

```yaml
title: AutoGen Studio Spawning Shell or LOLBin Child Process (AutoJack RCE)
id: 8a4b0d21-1385-4306-8078-a1b2c3d40002
status: experimental
description: An autogenstudio process spawning a shell, scripting host, or download utility, consistent with AutoJack MCP WebSocket server_params command injection (CWE-78).
references:
    - https://www.microsoft.com/en-us/security/blog/2026/06/18/autojack-single-page-rce-host-running-ai-agent/
    - https://cwe.mitre.org/data/definitions/78.html
author: Threadlinqs Team
date: 2026-06-18
tags:
    - attack.execution
    - attack.t1203
    - attack.t1059.001
    - attack.t1059.003
    - attack.t1106
logsource:
    category: process_creation
detection:
    selection_parent:
        ParentImage|endswith:
            - '\autogenstudio.exe'
            - '/autogenstudio'
        ParentCommandLine|contains: 'autogenstudio'
    selection_child:
        Image|endswith:
            - '\cmd.exe'
            - '\powershell.exe'
            - '\pwsh.exe'
            - '\calc.exe'
            - '\curl.exe'
            - '/bash'
            - '/sh'
            - '/curl'
    condition: selection_parent and selection_child
fields:
    - ParentImage
    - Image
    - CommandLine
falsepositives:
    - Legitimate MCP stdio servers intentionally launched by the developer
level: high
```

**Known false positives:**

- A developer intentionally launching a legitimate MCP stdio server (e.g. a Python/node MCP server) as a child of AutoGen Studio
- Benign AutoGen tool calls that legitimately shell out during normal prototyping

**Tuning notes:** Treat any hit carrying env/cmdline marker pwned=true as critical and auto-escalate — it is the PoC StdioServerParams env marker and has near-zero benign rate. For legitimate developer MCP servers, allowlist specific expected child executable paths (e.g. a known python venv MCP server) rather than disabling the rule. Extend the child list with org-specific LOLBins (rundll32, regsvr32) if seen abused.

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

- AutoGen Studio Unauthenticated MCP WebSocket Reached on Loopback — Exploitation (locked: unlock with TL Creds)
- AutoGen Studio Child Process with pwned Environment Marker — Post-Exploitation (locked: unlock with TL Creds)
- Web-Surfer Agent Visiting Newly-Seen Domain Then Reaching Loopback MCP — C2 / Lateral (locked: unlock with TL Creds)
- AutoJack Loopback Port Scan from Rendered-Page JavaScript — Exploitation Recon (locked: unlock with TL Creds)
- AutoJack StdioServerParams Injection Marker on MCP Route — Exploitation (locked: unlock with TL Creds)
- AutoGen Studio Spawning Download/Interpreter for Post-RCE C2 Staging — C2 / Lateral (locked: unlock with TL Creds)
- AutoJack MCP WebSocket server_params Injection from Localhost Origin — Exploitation (locked: unlock with TL Creds)
- Loopback MCP Listener Reached by Browser-Automation Agent After Port Scan — C2 / Lateral (locked: unlock with TL Creds)

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

## Sources

- [AutoJack: Single-page RCE on a host running an AI agent](https://www.microsoft.com/en-us/security/blog/2026/06/18/autojack-single-page-rce-host-running-ai-agent/)
- [When configuration becomes a vulnerability: Exploitable misconfigurations in AI apps](https://www.microsoft.com/en-us/security/blog/2026/05/14/configuration-becomes-vulnerability-exploitable-misconfigurations-ai-apps/)
- [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)
- [CVE-2025-52882: WebSocket authentication bypass in Claude Code extensions (analogous localhost WebSocket RCE)](https://securitylabs.datadoghq.com/articles/claude-mcp-cve-2025-52882/)
- [MCP Horror Stories: The Drive-By Localhost Breach (CVE-2025-49596, MCP Inspector localhost RCE)](https://www.docker.com/blog/mpc-horror-stories-cve-2025-49596-local-host-breach/)
- [microsoft/autogen — A programming framework for agentic AI](https://github.com/microsoft/autogen)
- [Confused deputy problem](https://en.wikipedia.org/wiki/Confused_deputy_problem)

## 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-0862
