跪拜 Guibai
← All articles
Artificial Intelligence · Programmer

EMBRACE Attacks: AI Coding Tools' Embedded Browsers Open a Backdoor to Your Dev Machine

By 深蓝AI ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

These vulnerabilities turn AI-assisted editors into a semi-open service that can read tabs, local files, and receive page messages, so one malicious webpage can compromise a developer's machine and steal production credentials. Two of the affected tools went unpatched for months, making active exploitation a realistic risk.

Summary

EMBRACE attacks work because five AI coding tools—Cursor, GitHub Copilot, OpenAI's Codex, Microsoft's VS Code, and Anthropic's Claude Desktop—embed a webview that grants pages capabilities a normal browser would never allow. A malicious page can send messages into Cursor's agent, which reassembles a command split across attributes and executes it, bypassing the model's defenses. In Codex, VS Code, and Claude Desktop, file pages can read any local file by putting the read in a Web Worker, which bypasses the project fence that only checks the top-level document; Codex doesn't even need a worker, as its top-level page can fetch directly. GitHub Copilot lets pages report their own address, so a fake github.com/login page can phish a user while the agent believes it's on the real site.

The report, published October 29, lists dates: Codex's issue was reported to OpenAI on July 27, VS Code's on September 10, and neither was patched by public disclosure. Cursor silently fixed its issue on October 1; Copilot was fixed in version 1.1.29 on October 13. The research shows that .DS_Store files on macOS can turn directory listings into full filesystem traversal, exposing SSH keys, .env files, and npm tokens. Four mitigations follow: update all five tools, treat any file page in an AI assistant as malicious, revoke default trust for credentials, and disable auto-run with an empty allowlist.

Takeaways
— EMBRACE stands for embedded browser used as a real browser; five AI coding tools are affected.
— Three attack forms: arbitrary code execution (Cursor), file exfiltration (Codex, VS Code, Claude Desktop), and context forgery (GitHub Copilot).
— Cursor fixed its issue silently on October 1; GitHub Copilot fixed in version 1.1.29 on October 13; Codex and VS Code were still unpatched as of October 29.
— Codex's top-level page can fetch any local file directly; VS Code and Claude Desktop can be bypassed via a Web Worker.
— macOS .DS_Store files enable full filesystem traversal for exfiltration.
— Mitigations: update to latest versions, treat file pages in AI assistants as malicious, use short-lived credentials, and disable auto-run with an empty allowlist.
Conclusions

AI agents' input channels become a new trust boundary: relaxing one browser rule per product seems reasonable individually, but together they give pages capabilities that browsers spent decades denying.

The long unpatched windows for Codex and VS Code suggest vendors treat risks that only trigger on user action as low priority, despite the potential for credential theft.

When an agent itself disabled the sandbox to run a payload, it showed that model-driven autonomy can amplify an injection into a more severe compromise than the payload alone would cause.

Concepts & terms
EMBRACE
A class of vulnerabilities where an embedded browser in a desktop app is granted capabilities beyond a normal browser, allowing page content to affect the host application.
Web Worker
A background script in web pages that runs separately from the main page; in these attacks, it bypasses security checks that only apply to the top-level document.
.DS_Store
A macOS file that stores directory view options and lists sibling files; it can be parsed to reconstruct directory listings for filesystem traversal.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗