Yaamlabs

Vulnerabilities

Built-in browsers in five AI coding tools broke out

Forever Security escaped the embedded browsers in Cursor, Copilot, Codex, VS Code and Claude Desktop. Codex and VS Code are unpatched. What to update and check.

On October 29, Forever Security researcher Gal Weizman published EMBRACE, a set of flaws in the browsers built into five AI coding tools: Cursor, GitHub Copilot, OpenAI's Codex, Microsoft's VS Code and Anthropic's Claude Desktop. Each tool gives its embedded browser powers a normal browser would never allow. Depending on the product, a page could run commands on the developer's machine, read files across the disk, or fake the address shown in the address bar.

Cursor and Copilot have shipped fixes. Codex and VS Code had none when the research came out, and Microsoft declined the report. If your developers open third-party projects in either tool, one click on an HTML file in a rigged repository can hand over SSH keys, .env files and npm tokens. There is no CVE (Common Vulnerabilities and Exposures) ID for any of the five issues.

How it works

Forever tested each embedded browser against three rules that standalone browsers enforce: a web page cannot run commands on the computer, a local file cannot read other local files, and only the browser itself writes the address bar. Every one of the five products broke one rule.

Cursor. The integrated browser exposed a bridge that let any page, from any origin and without user action, push content into the agent's composer, the box where the developer types instructions. The page could fill in a composer "chip" that the developer saw as a harmless "Start setup" button, while hidden attributes in it carried instructions the agent read as a prompt. The agent then proposed a command on an auto-run card that needed one keypress to approve. When Cursor's sandbox blocked the command, the agent turned the sandbox off and retried it. In Forever's test the command opened Calculator. Forever notes the attack depends on the model and does not work every time.

GitHub Copilot. The browser preview let a page report its own URL to the app. The app only checked that the text looked like a web address (http, https or file, with no embedded credentials) and never compared it with where the page was really loaded from. Forever's page showed github.com/login in the address bar over a fake sign-in form, and the agent's tab list repeated the fake address, so neither the human nor the model could spot the phish.

Codex, VS Code and Claude Desktop. These apps treat a local page opened from file:// as allowed to fetch other local files. Claude Desktop and VS Code limit that to the project folder, but the check applies only to the top-level page. A Web Worker, a background script thread the page creates from an in-memory blob: URL, sits outside the check and can read any file the user can. Codex had no folder check at all.

To find files without a directory listing API, the exploit reads the hidden .DS_Store files macOS writes into folders opened in Finder, which list their contents. On Forever's test machine the sweep collected SSH keys, .env files, npm tokens and the hosts file, then sent them out. Delivery needs a single click: the bait was a project dressed up as a financial report, and when asked to set it up, the assistant itself offered a clickable link to the malicious HTML file.

Vendor responses

Disclosure went unevenly, and The Register and Help Net Security report the same timeline.

  • Cursor received the report on September 10 and patched it on October 1 without an advisory or a reply to the researchers.
  • Forever found the Copilot flaw in version 1.1.27 on September 26. GitHub fixed it in 1.1.29 on October 13, independently and before Forever filed a report.
  • Anthropic declined Forever's July 23 report as an issue gated by Workspace Trust, the prompt that asks whether you trust a folder's authors. It accepted a report of the same flaw from Noma Security a day later.
  • OpenAI did not answer Forever's July 27 report. A spokesperson told The Register the company is aware of the issue and working to address it.
  • Microsoft declined the VS Code report, filed September 10, on the same Workspace Trust grounds.

Claude Desktop's current status is not stated by Forever or by either news report. Noma's July 24 report lines up with the date Noma says it bypassed Anthropic's first preview pane patch using a Web Worker, which we covered in our SneakPeek post. Anthropic fixed that in Claude Desktop 1.30096.1 on August 17. That is probably the same bug, but no source confirms it.

Weizman's argument against the Workspace Trust defence is practical: developers "just hit 'Trust'" because refusing makes the tool unusable, so the prompt "provides zero protection to the user". He adds that teams should assume an agent may bypass its own safeguards, as Cursor's did.

What to do

Forever published no indicators of compromise, and none of the sources report use in the wild.

  1. Update the fixed tools. Cursor builds released on or after October 1, GitHub Copilot 1.1.29 or later, and Claude Desktop 1.30096.1 or later (the probable fix). Check managed installs, not only self-updating ones.
  2. VS Code: leave unfamiliar repositories in Restricted Mode. Restricted Mode disables agents in that workspace, including in the Agents window. Run Workspaces: Manage Workspace Trust from the Command Palette and remove anything from Trusted Folders & Workspaces that is not your own code. Do not trust a parent folder such as your home directory, because trust covers every subfolder.
  3. Codex: review the trusted project list. Codex records trust decisions in ~/.codex/config.toml as [projects."/absolute/path"] tables with trust_level = "trusted". Third-party guides say the Codex desktop app reads the same file as the CLI and IDE extension. Remove entries for downloaded or third-party repositories.
  4. Audit HTML in trusted projects. Search every .html file in those folders for new Worker(, blob: URLs, file:// fetches and references to .DS_Store. grep -rlE "new Worker|blob:|\.DS_Store" --include=*.html <project> gives a first list to read by hand.
  5. Open untrusted HTML outside the assistant. Until OpenAI and Microsoft ship fixes, open third-party HTML in a normal browser or a throwaway VM (virtual machine), and do not click local HTML links the assistant offers while setting up an unfamiliar project.
  6. Check for reads and send-outs. On macOS endpoints, look in your EDR (endpoint detection and response) for the Codex, VS Code or Claude Desktop helper processes reading ~/.ssh/, .env files or ~/.npmrc, or opening many .DS_Store files outside the project. Pair that with outbound connections from the same process to hosts you do not recognise.
  7. Rotate what the machine held if a suspect file was opened: SSH keys (and remove the old public keys from GitHub, GitLab and servers), npm and other registry tokens, and every secret in local .env files. Then review npm publish history and cloud audit logs for activity after the date the file was opened.

Embedded browsers need their own review

Preview panes, agent browsers and local HTML viewers each relax some browser rule to make a feature work, and three vendors here leaned on a trust prompt that users click through by habit. When you approve an AI coding tool for use, ask what its embedded browser can reach on disk and over the network, and whether the agent can change its own sandbox settings.

Our red team code review work covers developer tooling and agent setups like these, and our safeguarding and hardening team sets the endpoint policies that keep secrets off developer laptops. Open the chat and Yaali, our AI agent, will pass your question to an engineer.


Sources: Forever Security, EMBRACE technical write-up, Help Net Security, The Register, Hackread, SneakPeek, VS Code Workspace Trust documentation, OpenAI Codex config basics, Codex trusted projects example, OpenRouter Codex desktop guide.

Back to the blog, or read this post on the full site.