MLQ
Back to News
AI AI AGENTS ANTHROPIC CYBERSECURITY

Anthropic's Claude Code Exposes Source Code Through Packaging Error for Second Time

Mar 31, 2026 · 2:27 PM · By · Edited by · 2 min read
Key points
  • Security researcher Chaofan Shou discovered on March 31, 2026, a 60MB source map file in Claude Code v2.1.88 npm package exposing 1,906 proprietary source files[1][2].
  • Leak includes internal API design, telemetry systems, encryption tools, but no user data or model weights[1][2].
  • Second incident; similar vulnerability occurred in February 2025[1][2].
  • Leaked code archived on GitHub repositories with over 1,100 stars and 1,900 forks shortly after discovery[1].
  • Anthropic has not issued a public statement on the incident[1][2].
Anthropic's Claude Code Exposes Source Code Through Packaging Error for Second Time

Anthropic's Claude Code command-line tool exposed its full source code through a source map file included in its npm package version 2.1.88, marking the second such incident in a year. Security researcher Chaofan Shou identified the issue on March 31, 2026, allowing reconstruction of 1,906 proprietary files detailing internal architecture and security mechanisms[1][2].

Details of the Leak

The exposure occurred via a 60MB file named cli.js.map in the npm package released on March 31, 2026. This source map enabled anyone to reconstruct the complete TypeScript codebase from the published build. The files covered internal API design, telemetry analysis systems, encryption tools, and inter-process communication protocols. The npm registry, the world's largest public software library, hosted the package widely used by developers[1][2].

Previous Incident and Response

This is the second time Claude Code has leaked source code due to a leftover source map file. In February 2025, an early version faced the same issue, leading Anthropic to remove it from npm and delete the source map. The problem resurfaced despite prior awareness. The leaked code was quickly archived on public GitHub repositories, one gaining over 1,100 stars and 1,900 forks within hours[1][2][4].

Scope and Immediate Risks

The leak does not involve model weights or user data, posing no direct risk to ordinary users' personal information or conversations with Claude. However, it reveals the tool's internal workings, including security layers, usage data collection, and communication protocols. Researcher Chaofan Shou, an intern at Fuzzland, flagged the issue publicly on X[1][2].

Further sources

This article was produced by MLQ.ai's AI newsroom and checked against primary sources such as company filings, official releases and court documents. Reports from a single outlet are attributed. Editor: Peter Foy. How we work · Spotted an error? Tell us.

More like this