Researchers discovered a chain of vulnerabilities in Claude Code Desktop’s HTML preview pane that lets a malicious HTML file achieve arbitrary file reads and silent exfiltration. The preview pane auto-renders HTML files: files under 256KB load as data: URLs with a Content Security Policy blocking scripts, but files over 256KB are written to disk and loaded as file:// URLs that do not receive the CSP. By padding a malicious coverage-report-style HTML file past 256KB, an attacker can run JavaScript in the preview, use fetch()/XMLHttpRequest to read local files, and send stolen secrets out via navigator.sendBeacon(). The PoC targeted common sensitive artifacts - SSH private keys, AWS keys, npm and GitHub tokens, Kubernetes credentials, Docker auth, and even the user’s IP via WebRTC - without any permission prompts.
Anthropic scored the issue CVSS 8.7 (High) and deployed a patch blocking direct fetch/XHR to file://, but researchers bypassed that fix by spawning Web Workers from blob: URLs to originate requests outside the patched context. After responsible disclosure and iterative testing, Anthropic implemented comprehensive mitigations and released a fixed client (Claude Desktop 1.30096.1). The finding amounts to host-equivalent compromise via routine file previews and underscores the importance of updating affected clients and hardening renderer request isolation.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.