- AutoJack is a novel attack chain disclosed by Microsoft’s Defender Security Research Team on June 18, 2026.
- A single malicious webpage can turn an AI browsing agent into a remote code execution (RCE) vector on the host machine.
- Three weaknesses are chained: an origin allowlist bypass, missing authentication on localhost MCP endpoints, and unsafe parameter handling that passes attacker-controlled values directly to shell commands.
- The attack was demonstrated on AutoGen Studio pre-release builds (
0.4.3.dev1and0.4.3.dev2). The stable PyPI release (0.4.2.2) is unaffected. A fix is in GitHub main at commitb047730but has not yet shipped as a patched stable release. - The vulnerability class is not limited to AutoGen. Any AI agent that browses the web and connects to localhost MCP servers over an unauthenticated WebSocket carries the same risk.
- Mitigations: authenticate localhost MCP connections, separate browsing agents from high-privilege tool access, require human confirmation before destructive tool calls, and treat web page content as untrusted input.
On June 18, 2026, Microsoft’s Defender Security Research Team published a proof-of-concept attack they named AutoJack. The finding is simple to state and uncomfortable to sit with: a single webpage under attacker control can cause an AI browsing agent to execute arbitrary code on the machine running it.
No user interaction beyond the agent visiting the page. No credentials stolen first. No malware installed. One page, one agent, one compromised host.
Microsoft named the attack AutoJack because it hijacks the agent’s autonomy. The user never explicitly approved the dangerous tool calls. The agent inferred them from instructions embedded in untrusted web content and acted on them faithfully.
What is AutoJack?
AutoJack is a chained exploit that moves from a malicious webpage to host-level remote code execution by routing commands through an AI browsing agent and an unauthenticated local MCP (Model Context Protocol) server.
MCP is the protocol that connects AI agents to local tools: shell access, file systems, databases, code execution environments. It was designed for convenience in local development. The default configuration assumes that anything connecting to localhost is trusted. AutoJack is what happens when that assumption meets an agent that browses the internet.
The AutoJack attack chain: how it works step by step
| Step | Stage | What happens | Weakness exploited |
|---|---|---|---|
| 1 | Malicious page load | Agent visits an attacker-controlled webpage containing hidden instructions in HTML, comments, or invisible text | Agent trusts web page content as legitimate task input |
| 2 | Agent compliance | Browsing agent interprets the embedded instructions as a legitimate command: ‘connect to local MCP server and run this’ | No distinction between trusted instructions and untrusted web content |
| 3 | Localhost MCP bridge | Agent opens a WebSocket to 127.0.0.1 where the MCP server listens. Origin check is passed because the agent itself runs as localhost. | Origin allowlist bypass: browsing agents pass origin checks by running as localhost |
| 4 | Unauthenticated MCP access | MCP endpoint accepts the WebSocket connection with no authentication. No token, no mTLS, no challenge required. | Missing authentication on localhost MCP endpoints |
| 5 | Host-level RCE | Attacker-controlled values are passed directly to shell commands through MCP tool calls. Arbitrary process execution on the host machine. | Unsafe parameter handling: attacker values reach shell commands unsanitised |
The name of the attack captures the mechanism precisely. The agent’s autonomy, its ability to infer tasks from content and act on them without explicit per-action approval, is the feature that becomes the vulnerability. AutoJack hijacks that autonomy.
The three vulnerabilities that make AutoJack possible
AutoJack is not a single flaw. It chains three distinct weaknesses that individually are acceptable risks but together produce host-level compromise.
1. Origin allowlist bypass
Browsers enforce same-origin policy to prevent websites from making requests to localhost on your behalf. AI browsing agents are not browsers. They are privileged clients that execute natural-language intent and invoke tools. When a browsing agent connects to a localhost MCP server, the connection appears to originate from localhost, not from the remote attacker’s page. The origin allowlist passes it without challenge.
2. Missing authentication on MCP endpoints
MCP’s local WebSocket transport was designed for convenience in development environments: start a server, point the client at a port, start coding. Authentication was left to implementers as an optional concern. In practice, most local MCP configurations run with no authentication because developers assume that localhost is a safe zone. Once the origin check is bypassed by the agent acting as a localhost client, the MCP endpoint accepts any instruction without verification.
3. Unsafe parameter handling
After gaining access to the unauthenticated MCP endpoint, the final step is executing a command. AutoJack achieves this because the AutoGen Studio vulnerable builds passed attacker-controlled values directly from the web page’s embedded instructions to shell commands through MCP tool calls, without sanitising or validating the input. This is the classic untrusted data to shell command injection pattern, applied at the MCP layer.
Which systems are actually affected?
| AutoGen Studio version | MCP route present | Vulnerable to AutoJack | Action required |
|---|---|---|---|
0.4.2.2 (stable PyPI release) | No | No | None |
0.4.3.dev1 (pre-release, PyPI) | Yes | Yes | Remove or pin away from dev builds |
0.4.3.dev2 (pre-release, PyPI) | Yes | Yes | Remove or pin away from dev builds |
GitHub main (commit b047730 / PR #7362) | Yes (patched) | No (fix applied) | Use patched main or await stable release |
The stable PyPI release of AutoGen Studio (0.4.2.2) has no MCP route and is not affected. The two pre-release builds, 0.4.3.dev1 and 0.4.3.dev2, shipped the vulnerable handler and remain on PyPI at the time of writing without being yanked. The fix is in GitHub main at commit b047730, merged via PR #7362, but a patched stable release has not yet been published (Let’s Data Science, June 20, 2026).
The vulnerability was demonstrated specifically against AutoGen Studio. But Microsoft’s disclosure explicitly addresses the broader pattern. Cursor, Claude Code, Copilot, Windsurf, and any IDE plugin that wires MCP locally share the same architectural assumption: tools on localhost are trusted because they are local. AutoJack demonstrates that assumption fails the moment an agent can be steered by external web content (Web Developer, June 18, 2026).
Who is at risk?
You are at risk if you:
- Run any AI browsing agent that can visit external URLs
- Have one or more MCP servers running on localhost simultaneously
- Use those MCP servers with shell, filesystem, database, or code execution tools
- Have not implemented authentication on your local MCP WebSocket connections
Web developers are particularly exposed because their workflows naturally combine untrusted web content (documentation, Stack Overflow, GitHub issues, npm READMEs) with powerful local tooling. An agent configured to read documentation and fix a bug is precisely the workflow AutoJack weaponises (Web Developer, June 18, 2026).
No widespread in-the-wild exploitation has been reported. The affected AutoGen Studio builds are developer-only pre-releases, not production deployments. Microsoft’s disclosure is responsible security research, not an emergency incident response situation.
How to protect against AutoJack
Microsoft’s security blog outlines defences that apply beyond AutoGen Studio to any agent framework using local MCP servers.
1 Authenticate localhost MCP connections
Require tokens or mutual TLS (mTLS) even for loopback connections. The assumption that localhost is inherently safe does not hold when an AI agent can be steered by external content. An authenticated connection means a hijacked agent cannot blindly connect and issue commands.
2 Separate browsing agents from high-privilege tooling
Do not give web-facing agents direct access to MCP servers with shell, filesystem, or database tools. Use a sandboxed tool tier for agents that consume untrusted input. High-privilege MCP servers should only be accessible to agents operating in controlled, trusted contexts.
3 Require human confirmation before destructive tool calls
Any shell execution, file deletion, or network egress initiated from an agent session should require explicit human approval. This breaks the automated chain that AutoJack depends on: the attack requires the agent to act on embedded instructions without user confirmation.
4 Treat web page content as untrusted input
Implement prompt and page isolation: strip or ignore tool-invocation patterns embedded in HTML, comments, metadata, or invisible text. Web page content should be treated with the same suspicion as any other external, untrusted data source.
5 Run MCP servers with least-privilege scopes
A read-only repository MCP cannot be used to drop a reverse shell. Limit each MCP server to the minimum permissions required for its intended function. Review which tools each agent profile can invoke and remove access that is not actively needed.
6 If using AutoGen Studio, pin away from pre-release builds
If you have installed 0.4.3.dev1 or 0.4.3.dev2, remove or pin to the stable 0.4.2.2 release. Monitor the AutoGen Studio GitHub repository for a patched stable release based on commit b047730.
What AutoJack reveals about AI agent security
AutoJack is the first publicly documented proof-of-concept showing host-level RCE achieved through an AI agent’s tool-use capability. The attack class it represents, indirect prompt injection targeting tool calls rather than chat output, is likely to become more common as agent adoption accelerates.
The MCP ecosystem is expanding rapidly: registries, discovery protocols, and IDE integrations make MCP the default connection layer between agents and local tools. Protocol adoption is outpacing security hardening. Enterprise teams should treat MCP servers like microservices on an internal network: they require authentication, audit logs, network segmentation, and regular review of tool permissions (Web Developer, June 18, 2026).
The broader principle Microsoft’s research establishes is this: when an agent can browse untrusted content and access local services, traditional security boundaries, including localhost, are no longer reliable. Security assumptions built for browsers do not transfer to agents. Agents are not browsers. They are autonomous, tool-using systems with their own trust models, and those trust models need explicit security design, not inherited assumptions.
Conclusion
AutoJack is a wake-up call for every developer running AI agents alongside local MCP servers. The vulnerability is not theoretical. It is a reproducible, documented exploit chain that turns a routine browsing session into host-level code execution. The fix is straightforward: authenticate localhost connections, separate browsing from tooling, and never assume that local means safe. AI agents need explicit security design, not inherited assumptions built for a different era.
Resources
- AutoJack: How a single page can RCE the host running your AI agent — Microsoft Security Blog
- Microsoft’s AutoJack attack shows how a malicious webpage can RCE your local AI agent — Web Developer
- Microsoft AutoJack exposes RCE via AI browsing agents — Let’s Data Science
- Microsoft warns of AutoJack: web-enabled agents risk host-level RCE — Softonic
FAQ
What is AutoJack?
AutoJack is a proof-of-concept exploit chain disclosed by Microsoft on June 18, 2026, showing how a single malicious webpage can achieve remote code execution on the machine running a local AI browsing agent. It chains three vulnerabilities: an origin allowlist bypass, missing authentication on localhost MCP endpoints, and unsafe parameter handling that passes attacker-controlled values to shell commands.
Is AutoJack actively being exploited?
No widespread in-the-wild exploitation has been reported. Microsoft’s disclosure is responsible security research. The affected AutoGen Studio builds (0.4.3.dev1 and 0.4.3.dev2) are developer-only pre-releases, not production software. The stable PyPI release (0.4.2.2) is not affected.
Which versions of AutoGen Studio are vulnerable?
The pre-release builds 0.4.3.dev1 and 0.4.3.dev2, both available on PyPI, contain the vulnerable MCP handler. The stable release 0.4.2.2 does not contain an MCP route and is not affected. A fix has been merged into GitHub main at commit b047730 (PR #7362) but has not yet shipped as a patched stable release.
Does AutoJack affect other AI agent frameworks beyond AutoGen?
The vulnerability was demonstrated against AutoGen Studio. However, Microsoft explicitly states that the underlying pattern applies broadly to any agent that browses the web and connects to localhost MCP servers over an unauthenticated WebSocket. Cursor, Claude Code, Copilot, Windsurf, and similar tools share the same architectural assumption that makes AutoJack possible.
How is AutoJack different from prompt injection?
Standard prompt injection manipulates an AI model’s text output: it tricks the model into saying something it should not. AutoJack manipulates tool use: it tricks the agent into doing something it should not, specifically executing attacker-controlled commands at the host operating system level through MCP tool calls. The impact is fundamentally different: host-level code execution versus modified chat output.


