/* global window */
window.registerArticle({
  slug: '2026-06-20-autojack-agentes-mcp',
  category: 'noticias',
  date: '2026-06-20',
  related: ['governanca-de-agentes', 'integrar-com-o-que-o-time-ja-usa'],
  image: { src: 'assets/news/2026-06-20-autojack-agentes-mcp.jpg', zoom: 1, fx: 0.5, fy: 0.5, credit: 'Foto: Hannes Grobe, CC BY-SA 4.0. Tratada em halftone.' },
  i18n: {
    pt: {
      title: 'AutoJack: uma página web sequestra o agente e roda código na máquina',
      dek: 'A Microsoft mostrou como um agente de IA que navega na web pode ser usado para executar código no computador que o roda, passando por um endpoint MCP sem autenticação. Um lembrete duro de que conectar agente a ferramenta é superfície de ataque.',
      body: [
        { type: 'lead', text: ['Em 18 de junho, o time de pesquisa de segurança da Microsoft ', { href: 'https://www.microsoft.com/en-us/security/blog/2026/06/18/autojack-single-page-rce-host-running-ai-agent/', text: 'publicou o AutoJack' }, ', uma cadeia de exploração em que uma única página web, aberta por um agente de IA que navega, consegue executar processos arbitrários na máquina que roda o agente. Sem credencial e sem mais nenhum clique.'] },
        { type: 'h2', text: 'O que acontece' },
        { type: 'p', text: ['O alvo da demonstração é o AutoGen Studio. A página maliciosa, renderizada pelo agente, alcança um WebSocket do ', { b: 'Model Context Protocol (MCP)' }, ' que roda local e dispara um comando no host. A Microsoft chamou de AutoJack porque o ataque sequestra o agente e abusa do acesso local de confiança dele para furar a fronteira do localhost.'] },
        { type: 'p', text: 'A falha é a soma de três descuidos encadeados, e é aí que está a lição:' },
        { type: 'ul', items: [
          [{ b: 'Origem confiável demais' }, ': o WebSocket aceitava conexões do localhost, mas o agente local é o localhost, então o código da página passa na checagem de origem.'],
          [{ b: 'Endpoint sem autenticação' }, ': o middleware de auth pulava os caminhos /api/mcp/*, supondo que o próprio handler validaria o token. Ele nunca validou.'],
          [{ b: 'Parâmetro executado sem filtro' }, ': o endpoint recebia o comando pela URL, decodificava e executava verbatim, aceitando coisas como powershell.exe ou bash -c.'],
        ] },
        { type: 'callout', title: 'O que está afetado (e o que não está)', text: ['Segundo a ', { href: 'https://thehackernews.com/2026/06/autojack-attack-lets-one-web-page.html', text: 'The Hacker News' }, ', a versão estável do AutoGen Studio (0.4.2.2) não tem a rota MCP e não é vulnerável. O problema está em builds de pré-lançamento (0.4.3.dev1 e 0.4.3.dev2) publicados no PyPI. A correção já está no GitHub, mas ainda não saiu em release estável. A Microsoft diz que não viu exploração real na natureza.'] },
        { type: 'h2', text: 'Por que importa para quem implementa IA' },
        { type: 'p', text: ['Esse furo não é sobre um produto específico, é sobre um padrão que vai se repetir. Quanto mais a gente conecta agente a ferramenta (e o MCP existe justamente para isso, como a ', { href: 'https://www.csoonline.com/article/4187155/microsoft-says-web-enabled-ai-agents-can-trigger-host-level-rce.html', text: 'CSO Online' }, ' aponta), mais cada conexão vira superfície de ataque. Um agente que navega na web e ao mesmo tempo fala com ferramentas internas junta duas coisas que não deveriam se encontrar sem barreira no meio.'] },
        { type: 'h2', text: 'A leitura da Moore' },
        { type: 'p', text: ['Para a gente, isso reforça o que separa uma demo de um agente em produção: o desenho ao redor dele. As próprias mitigações da Microsoft são o checklist: rodar com privilégio mínimo e isolado, exigir autenticação em todos os caminhos, nunca passar parâmetro direto para o shell e separar a identidade que navega da que tem acesso interno. É o trabalho de ', { to: 'governanca-de-agentes', text: 'governança de agentes' }, ' e de ', { to: 'integrar-com-o-que-o-time-ja-usa', text: 'integrar com cuidado ao que o time já usa' }, '. Colocar o agente para operar é fácil. Colocar para operar com segurança é o serviço.'] },
        { type: 'ul', items: [
          [{ href: 'https://www.microsoft.com/en-us/security/blog/2026/06/18/autojack-single-page-rce-host-running-ai-agent/', text: 'Microsoft Security Blog: AutoJack, RCE no host que roda o agente' }],
          [{ href: 'https://thehackernews.com/2026/06/autojack-attack-lets-one-web-page.html', text: 'The Hacker News: uma página sequestra o agente para rodar código' }],
          [{ href: 'https://www.csoonline.com/article/4187155/microsoft-says-web-enabled-ai-agents-can-trigger-host-level-rce.html', text: 'CSO Online: agentes de IA com acesso à web podem disparar RCE no host' }],
        ] },
      ],
    },
    en: {
      title: 'AutoJack: a web page hijacks the agent and runs code on the machine',
      dek: 'Microsoft showed how a web-browsing AI agent can be turned into a way to execute code on the machine that runs it, through an unauthenticated MCP endpoint. A hard reminder that connecting an agent to a tool is attack surface.',
      body: [
        { type: 'lead', text: ['On June 18, Microsoft’s security research team ', { href: 'https://www.microsoft.com/en-us/security/blog/2026/06/18/autojack-single-page-rce-host-running-ai-agent/', text: 'published AutoJack' }, ', an exploit chain where a single web page, opened by a browsing AI agent, can run arbitrary processes on the machine that runs the agent. No credentials, no extra click.'] },
        { type: 'h2', text: 'What happens' },
        { type: 'p', text: ['The demo targets AutoGen Studio. The malicious page, rendered by the agent, reaches a local ', { b: 'Model Context Protocol (MCP)' }, ' WebSocket and fires a command on the host. Microsoft called it AutoJack because the attack hijacks the agent and abuses its trusted local access to break the localhost boundary.'] },
        { type: 'p', text: 'The flaw is the sum of three chained oversights, and that is where the lesson is:' },
        { type: 'ul', items: [
          [{ b: 'Origin trusted too much' }, ': the WebSocket accepted localhost connections, but the local agent is localhost, so the page’s code passes the origin check.'],
          [{ b: 'Unauthenticated endpoint' }, ': the auth middleware skipped /api/mcp/* paths, assuming the handler would verify the token. It never did.'],
          [{ b: 'Parameter run without filtering' }, ': the endpoint took the command from the URL, decoded it and ran it verbatim, accepting things like powershell.exe or bash -c.'],
        ] },
        { type: 'callout', title: 'What is affected (and what is not)', text: ['According to ', { href: 'https://thehackernews.com/2026/06/autojack-attack-lets-one-web-page.html', text: 'The Hacker News' }, ', the stable AutoGen Studio release (0.4.2.2) has no MCP route and is not vulnerable. The problem is in pre-release builds (0.4.3.dev1 and 0.4.3.dev2) shipped to PyPI. The fix is already on GitHub but has not landed in a stable release yet. Microsoft says it has seen no exploitation in the wild.'] },
        { type: 'h2', text: 'Why it matters for anyone implementing AI' },
        { type: 'p', text: ['This hole is not about one product, it is about a pattern that will repeat. The more we connect agents to tools (and MCP exists precisely for that, as ', { href: 'https://www.csoonline.com/article/4187155/microsoft-says-web-enabled-ai-agents-can-trigger-host-level-rce.html', text: 'CSO Online' }, ' notes), the more each connection becomes attack surface. An agent that browses the web and also talks to internal tools puts together two things that should not meet without a barrier in between.'] },
        { type: 'h2', text: 'The Moore reading' },
        { type: 'p', text: ['For us this reinforces what separates a demo from an agent in production: the design around it. Microsoft’s own mitigations are the checklist: run least-privilege and isolated, require authentication on every path, never pass a parameter straight to the shell, and separate the identity that browses from the one with internal access. That is the work of ', { to: 'governanca-de-agentes', text: 'agent governance' }, ' and of ', { to: 'integrar-com-o-que-o-time-ja-usa', text: 'integrating carefully with what the team already uses' }, '. Getting the agent to operate is easy. Getting it to operate safely is the job.'] },
        { type: 'ul', items: [
          [{ href: 'https://www.microsoft.com/en-us/security/blog/2026/06/18/autojack-single-page-rce-host-running-ai-agent/', text: 'Microsoft Security Blog: AutoJack, RCE on the host running the agent' }],
          [{ href: 'https://thehackernews.com/2026/06/autojack-attack-lets-one-web-page.html', text: 'The Hacker News: a single page hijacks the agent to run code' }],
          [{ href: 'https://www.csoonline.com/article/4187155/microsoft-says-web-enabled-ai-agents-can-trigger-host-level-rce.html', text: 'CSO Online: web-enabled AI agents can trigger host-level RCE' }],
        ] },
      ],
    },
    es: {
      title: 'AutoJack: una página web secuestra al agente y corre código en la máquina',
      dek: 'Microsoft mostró cómo un agente de IA que navega la web puede usarse para ejecutar código en la máquina que lo corre, a través de un endpoint MCP sin autenticación. Un recordatorio duro de que conectar un agente a una herramienta es superficie de ataque.',
      body: [
        { type: 'lead', text: ['El 18 de junio, el equipo de investigación de seguridad de Microsoft ', { href: 'https://www.microsoft.com/en-us/security/blog/2026/06/18/autojack-single-page-rce-host-running-ai-agent/', text: 'publicó AutoJack' }, ', una cadena de explotación en la que una sola página web, abierta por un agente de IA que navega, logra ejecutar procesos arbitrarios en la máquina que corre el agente. Sin credenciales y sin ningún clic más.'] },
        { type: 'h2', text: 'Qué pasa' },
        { type: 'p', text: ['El blanco de la demostración es AutoGen Studio. La página maliciosa, renderizada por el agente, alcanza un WebSocket del ', { b: 'Model Context Protocol (MCP)' }, ' que corre local y dispara un comando en el host. Microsoft lo llamó AutoJack porque el ataque secuestra al agente y abusa de su acceso local de confianza para romper la frontera del localhost.'] },
        { type: 'p', text: 'La falla es la suma de tres descuidos encadenados, y ahí está la lección:' },
        { type: 'ul', items: [
          [{ b: 'Origen demasiado confiable' }, ': el WebSocket aceptaba conexiones del localhost, pero el agente local es el localhost, así que el código de la página pasa el chequeo de origen.'],
          [{ b: 'Endpoint sin autenticación' }, ': el middleware de auth salteaba los caminos /api/mcp/*, suponiendo que el handler validaría el token. Nunca lo validó.'],
          [{ b: 'Parámetro ejecutado sin filtro' }, ': el endpoint tomaba el comando de la URL, lo decodificaba y lo ejecutaba verbatim, aceptando cosas como powershell.exe o bash -c.'],
        ] },
        { type: 'callout', title: 'Qué está afectado (y qué no)', text: ['Según ', { href: 'https://thehackernews.com/2026/06/autojack-attack-lets-one-web-page.html', text: 'The Hacker News' }, ', la versión estable de AutoGen Studio (0.4.2.2) no tiene la ruta MCP y no es vulnerable. El problema está en builds de prelanzamiento (0.4.3.dev1 y 0.4.3.dev2) publicados en PyPI. La corrección ya está en GitHub, pero todavía no salió en una versión estable. Microsoft dice que no vio explotación real en la naturaleza.'] },
        { type: 'h2', text: 'Por qué importa para quien implementa IA' },
        { type: 'p', text: ['Este agujero no es sobre un producto puntual, es sobre un patrón que se va a repetir. Cuanto más conectamos agentes a herramientas (y MCP existe justo para eso, como señala ', { href: 'https://www.csoonline.com/article/4187155/microsoft-says-web-enabled-ai-agents-can-trigger-host-level-rce.html', text: 'CSO Online' }, '), más cada conexión se vuelve superficie de ataque. Un agente que navega la web y a la vez habla con herramientas internas junta dos cosas que no deberían encontrarse sin una barrera en el medio.'] },
        { type: 'h2', text: 'La lectura de Moore' },
        { type: 'p', text: ['Para nosotros esto refuerza lo que separa una demo de un agente en producción: el diseño a su alrededor. Las propias mitigaciones de Microsoft son el checklist: correr con mínimo privilegio y aislado, exigir autenticación en todos los caminos, nunca pasar un parámetro directo al shell y separar la identidad que navega de la que tiene acceso interno. Es el trabajo de ', { to: 'governanca-de-agentes', text: 'gobernanza de agentes' }, ' y de ', { to: 'integrar-com-o-que-o-time-ja-usa', text: 'integrar con cuidado a lo que el equipo ya usa' }, '. Poner el agente a operar es fácil. Ponerlo a operar con seguridad es el servicio.'] },
        { type: 'ul', items: [
          [{ href: 'https://www.microsoft.com/en-us/security/blog/2026/06/18/autojack-single-page-rce-host-running-ai-agent/', text: 'Microsoft Security Blog: AutoJack, RCE en el host que corre el agente' }],
          [{ href: 'https://thehackernews.com/2026/06/autojack-attack-lets-one-web-page.html', text: 'The Hacker News: una página secuestra al agente para correr código' }],
          [{ href: 'https://www.csoonline.com/article/4187155/microsoft-says-web-enabled-ai-agents-can-trigger-host-level-rce.html', text: 'CSO Online: agentes de IA con acceso web pueden disparar RCE en el host' }],
        ] },
      ],
    },
  },
});
