Skip to the content
AI and Cybersecurity Learning and Practice Center Test automation Open the Learning Center

IncidentCoding assistants

SneakPeek: a web page Claude Code Desktop previewed could read a developer's keys and send them out, with no click

HighAnthropicNoma Security

Noma Security's researcher Eli Ainhorn found that the preview pane of the Claude Code Desktop app, which renders HTML files Claude creates or changes, executed JavaScript from those files, CSO Online reported on October 14, 2026. An HTML file planted in a public repository could, when a developer asked Claude Code to look at it, read local files such as AWS credentials, GitHub secrets and SSH private keys and send them to a remote server, with no further action by the user; the script ran in the pane's rendering process, not as an agent action, so agent-level logs would not show it. Three causes: HTML under 256 KB was rendered as a data URL under a strict content security policy, but larger files were written to disk and loaded from a file:// address that bypassed the policy; file:// loads got file-system access rather than an isolated origin; and a filter meant to block file:// access was not active during static rendering. Anthropic's first patch blocked file reads from the main page, and Noma bypassed it by moving the read into a Web Worker; a deeper architectural fix followed, and Noma says the issue is fully resolved. Anthropic rated it CVSS 8.7 and requested a CVE; it did not respond to CSO. Which versions were affected was not published.

Replay the attack step by step in the Learning Center

How it happened

  1. A malicious HTML file in a repository is large enough to be written to disk and previewed from a file:// address, outside the preview's content security policy.
  2. Its script reads the developer's credential files from the file system and posts them to the attacker.
  3. The read happens in the renderer, so nothing the agent did appears in its own logs.

Impact

Developer credentials on the machine, by Noma's account; no exploitation reported, and the flaw is fixed.

The fix

Update Claude Code Desktop; keep long-lived credentials off developer machines in favor of short-lived scoped tokens; and watch file reads and outbound connections at the runtime layer, not only in the agent's log.

Lessons

  • A preview pane is a browser; what it renders from an untrusted repository is untrusted web content with a file system behind it.
  • A size threshold that changes how content is loaded is a security boundary, whether or not anyone meant it to be.

Sources