Claude Code npm release includes full source code via source map
A routine release shipped the internal source of a widely used AI coding agent, and attackers used public interest in the leak as a malware lure.
- What happened
- Version 2.1.88 of Anthropic's Claude Code package on npm included a source map file of about 60 MB. It pointed to the complete, unobfuscated TypeScript source, covering agent orchestration, permission systems, memory and unreleased feature flags. Researcher Chaofan Shou spotted it, and copies spread quickly on GitHub. The same day, separately, malicious versions of the axios npm package, a Claude Code dependency, were published between 00:21 and 03:29 UTC. In the following days, Zscaler ThreatLabz found fake GitHub repositories offering the 'leaked Claude Code' that delivered Vidar infostealer and GhostSocks proxy malware.
- Response
- Anthropic called it 'a release packaging issue caused by human error, not a security breach' and said no customer data or credentials were exposed. It issued DMCA notices to remove copies from GitHub and said it would add preventive measures.
- Discovered by
- Security researcher Chaofan Shou (@Fried_rice), who posted on social media; follow-on malware by Zscaler ThreatLabz.
- Who was affected
- Anthropic (about 512,000 lines of TypeScript across ~1,900 files); users who later downloaded fake 'leaked source' repositories containing malware
- Patterns
- Sources
- Claude Code source code accidentally leaked in NPM packageBleepingComputer, 31 Mar 2026
- Claude Code Leak: Critical AI Security Threat 2026Zscaler ThreatLabz, 1 Apr 2026
- Claude Code source leakInfoQ, 7 Apr 2026
Related
Incidents with the same pattern
What does this ask of people?
Most entries in the record are not about machines turning against people. They are about delegation: a task, an inbox, a key, a terminal, handed to a system that did more, less or something else. Futures literacy starts with noticing that.