Back to articles
Anthropic Accidentally Published 513K Lines of Claude Code Source on npm — What Developers Need to Know

Anthropic Accidentally Published 513K Lines of Claude Code Source on npm — What Developers Need to Know

via Dev.toGuy Ruvio

On March 31, 2026, a 59.8 MB JavaScript source map shipped inside the npm package @anthropic-ai/claude-code version 2.1.88. It contained 513,000 lines of unobfuscated TypeScript across 1,906 files — Anthropic's full Claude Code agent architecture, published by accident. What Happened A Bun packaging error combined with a missing .npmignore file caused the source map to be included in the published npm package. Security researcher Chaofan Shou discovered and posted about it on X. Within hours, the source was mirrored to GitHub and forked tens of thousands of times. The CVEs Two CVEs were assigned: CVE-2025-59536 — Remote code execution via malicious repository configs CVE-2026-21852 — API key exfiltration through hooks and MCP (Model Context Protocol) servers The leak exposed exact orchestration logic, making these exploits trivially reproducible by attackers who studied the source. The Same-Day Supply Chain Attack In a coincidence that made an already bad day worse, the axios npm packa

Continue reading on Dev.to

Opens in a new tab

Read Full Article
2 views

Related Articles