Anthropic Confirms Claude Code Source Leak From npm Packaging Error

Summary
Anthropic says a packaging error in Claude Code v2.1.88 exposed nearly 2,000 TypeScript files, but no customer data or credentials. The article also reports typosquats and warns some npm users may have received trojanized Axios; downgrade and rotate secrets.
Key points
- Claude Code v2.1.88 included a source map exposing nearly 2,000 TypeScript files and more than 512,000 lines of code; the version was removed from npm.
- Anthropic attributed the release to human error and said no sensitive customer data or credentials were exposed.
- The exposed code revealed internal features including KAIROS, multi-agent orchestration, self-healing memory, and Undercover Mode.
- Straiker warned that access to the code could help attackers craft jailbreaks and payloads that persist through context compaction.
- Users who installed or updated Claude Code via npm on March 31, 2026, between 00:21 and 03:29 UTC may have received a trojanized HTTP client containing a cross-platform remote access trojan.
- Attackers published five typosquatted npm package names; the article said they were empty stubs at the time, with potential for later malicious updates.
- Users in the stated Axios risk window were advised to downgrade to a safe version and rotate secrets.
Article Details
- Event Type
- Accidental source code exposure through an npm package release, followed by reported typosquatting of internal package names.
- Impact
- A source map in Claude Code version 2.1.88 exposed nearly 2,000 TypeScript files and more than 512,000 lines of internal code. Anthropic said no customer data or credentials were exposed and attributed the incident to a packaging error. The disclosure may aid attempts to bypass safeguards or exploit the software supply chain. Separately, users who installed or updated Claude Code via npm during the reported Axios compromise window may have received a trojanized HTTP client.
MITRE ATT&CK
People
Threat Actors
Vendors
Products
Claude CodeAnthropic confirmed that internal source code for its AI coding assistant Claude Code was inadvertently published via an npm package release, exposing nearly 2,000 TypeScript files and extensive implementation details.npmAnthropic confirmed that internal source code for its AI coding assistant Claude Code was inadvertently published via an npm package release, exposing nearly 2,000 TypeScript files and extensive implementation details.
