Claude Code npm 2.1.88 shipped a source map that exposed the CLI's source code
Summary
Version 2.1.88 of the @anthropic-ai/claude-code npm package included a large source map file (cli.js.map) that let anyone rebuild the CLI's TypeScript source, more than 512,000 lines in almost 2,000 files. Researcher Chaofan Shou pointed it out on X and copies spread on GitHub. Anthropic said no sensitive customer data or credentials were involved or exposed, and called it a release packaging issue caused by human error, not a security breach. Version 2.1.88 is no longer on npm. This exposed Anthropic's own code, not user data.
Severity
Timeline
Claude Code 2.1.88 is live on npm with the cli.js.map source map included.
Chaofan Shou flags it on X; the code is mirrored on GitHub.
Anthropic confirms to Ars Technica, CNBC, VentureBeat and others: packaging error caused by human error, no customer data or credentials exposed.
How it happened
A source map links shipped JavaScript back to the original source and can embed the full source text. Including it in the public npm package exposed the whole CLI codebase. Same-day reporting also covered a separate, unrelated attack on the axios npm package; VentureBeat advised anyone who installed Claude Code via npm between 00:21 and 03:29 UTC on Mar 31 to check lockfiles for axios 1.14.1 or 0.30.4. That was a different incident, not part of this leak.
How to check your app
- If you publish npm packages, run npm pack --dry-run and check for .map files before every release, or exclude them in package.json files or .npmignore.
- Make sure you are not still on Claude Code 2.1.88.
- If you installed via npm on Mar 31, 2026, check lockfiles for axios 1.14.1 or 0.30.4 (the separate axios incident).
Sources
- Ars Technica: Entire Claude Code CLI source code leaks thanks to exposed map file
- CNBC: Anthropic leaks part of Claude Code's internal source code
- VentureBeat: Claude Code's source code appears to have leaked