Skip to content
Tech News
← Back to articles

Entire Claude Code CLI source code leaks thanks to exposed map file

read original more articles
Why This Matters

The leak of Anthropic’s Claude Code CLI source code exposes detailed insights into its architecture, potentially enabling competitors and malicious actors to replicate or exploit the technology. This incident highlights the importance of rigorous security practices in software deployment, especially for AI companies experiencing rapid growth. It underscores the need for robust internal controls to prevent sensitive code exposure that could undermine competitive advantage and security.

Key Takeaways

The entire source code for Anthropic’s Claude Code command line interface application (not the models themselves) has been leaked and disseminated, apparently thanks to a serious internal error. The leak gives competitors and armchair enthusiasts a detailed blueprint for how Claude Code works—a significant setback for a company that has seen explosive user growth and industry impact over the past several months.

Early this morning, Anthropic published version 2.1.88 of Claude Code npm package—but it was quickly discovered that package included a source map file, which could be used to access the entirety of Claude Code’s source—almost 2,000 TypeScript files and more than 512,000 lines of code.

Security researcher Chaofan Shou was the first to publicly point it out on X, with a link to an archive containing the files. The codebase was then put in a public GitHub repository, and it has been forked tens of thousands of times.

Anthropic publicly acknowledged the mistake in a statement to VentureBeat and other outlets, which reads:

Earlier today, a Claude Code release included some internal source code. No sensitive customer data or credentials were involved or exposed. This was a release packaging issue caused by human error, not a security breach. We’re rolling out measures to prevent this from happening again.

Developers have already begun picking it apart and analyzing it. For example, @himanshustwts on X posted a detailed overview of Claude Code’s memory architecture, describing systems like background memory re-writing and various steps to verify memories’ validity before use.