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 (59.8 MB, per VentureBeat) 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 published to npm with the source map included, per npm registry metadata.
Chaofan Shou flags it on X; the code is mirrored on GitHub.
Anthropic confirms in a statement to VentureBeat, CNBC and other outlets (quoted by Ars Technica): 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
- npm registry metadata for @anthropic-ai/claude-code
Corrections and updates
Corrected the incident date: npm registry metadata dates the 2.1.88 release to Mar 30, 2026, 22:36 UTC; we had listed Mar 31 with no exact time. Added the npm registry as a source.
Re-checked against all four sources. Moved the first timeline row to the npm publish time (Mar 30, 2026, 6:36 PM ET) to match the incident date, and dropped the file name cli.js.map, which none of our sources gives; VentureBeat gives the map's size, 59.8 MB.
Cite this entry
- Title
- Claude Code npm 2.1.88 shipped a source map that exposed the CLI's source code
- Added
- Oct 14, 2026
- URL
- https://vibeincidents.com/incidents/claude-code-npm-sourcemap-leak/
- Suggested citation
VibeIncidents. "Claude Code npm 2.1.88 shipped a source map that exposed the CLI's source code." Oct 14, 2026. https://vibeincidents.com/incidents/claude-code-npm-sourcemap-leak/