Claude Code Source Code Leaked via npm Packaging Error
Severity: Medium (Score: 59.2)
Sources: Bleepingcomputer, News.Ycombinator, Theregister, Thehackernews, Venturebeat
Summary
On March 31, 2026, Anthropic inadvertently exposed the entire source code of its AI tool, Claude Code, by including a 59.8 MB source map file in a public npm package. This leak, caused by human error, allowed access to approximately 1,900 TypeScript files and over 500,000 lines of code, which were quickly mirrored and analyzed online. Anthropic confirmed that no sensitive customer data was involved, but the leak poses a significant risk as competitors can now study the architecture and features of Claude Code. The exposed code includes a sophisticated memory architecture and various undocumented features, potentially enabling rivals to replicate or improve upon Anthropic's technology. The company is taking steps to prevent future incidents and has begun issuing DMCA takedown notices for the leaked code. The incident follows a recent pattern of accidental exposures at Anthropic, raising concerns about their internal security practices. Key Points: • Anthropic leaked the entire source code for Claude Code due to a packaging error. • The leak includes over 500,000 lines of code and critical architectural details. • No sensitive customer data was exposed, but the leak provides competitors with valuable insights.
Key Entities
- Data Breach (attack_type)
- Malware (attack_type)
- Supply Chain Attack (attack_type)
- Trojan (attack_type)
- Anthropic (company)
- Anthropic PBC (company)
- Defense Department (company)
- U.S. Department Of War (company)
- OpenCode (tool)
- Bash (tool)
- Bun (tool)
- JavaScript (tool)
- Npm (tool)
- ccleaks.com (domain)
- T1059.004 - Unix Shell (mitre_attack)
- T1195 - Supply Chain Compromise (mitre_attack)
- T1557 - Adversary-in-the-Middle (mitre_attack)
- T1567 - Exfiltration Over Web Service (mitre_attack)
- Node (platform)
- Axios (platform)