← Back to list

Claude Code Source Leak: Anthropic unexpectedly packed 60MB Source Map, full code restored

itadol5j

On March 30, 2026, a major security incident broke out in AI!Anthropic AI programming tool Claude Code's npm package unexpectedly contains full source Map files (cli.js. Map, about 60MB), from which the attackers can restore the entire TypeScript source code. This is another leak of Claude Code's source code after it was first released in February 2025. Although the leak is a CLI client code and does not involve model weights or user data,Internal API design, telemetry, encryption tools, inter-process communication protocolsThe details of the core realization are completely exposed. This paper will provide a detailed analysis of the technical details of the incident, its scope and recommendations for response.

Claude Code leak cover.

Summary of events

According to Chaofan Shou, an intern researcher at Fuzzland, a block chain security company, X.Claude Code v2.1.88 contains the full source Map file in the npm package:

FieldsDetails
DocumentationCli.js.map
SizeAbout 60MB (compressed)
Versionv2.1.88 (published on 30 March)
Previous Versionv2.1.87 (29 March, excluding source Map)
Volume changeSurge from 17MB to 31MB

The source Map fileShould not appear in production release packagesis the latest construction accident introduced.

Technical Details

What's Source Map?

Source Map is used in JavaScript developmentMap compressed code back to original source. It is usually used for:

  • Develop debugging: debugging compressed code in browser
  • Error tracking: mapping the production environment to the source code position
  • Code analysis: understand the original structure of the compression code

Never include source Map file in the production environmentbecause it exposes the full source code.

Disclosure analysis

Revert the source map contents 1,906 full text of Claude Code files, covering:

  • Internal API Design:API call details and interface specifications
  • Telemetry system: Data collection and reporting logic
  • Encryption Tool: Secure encrypted
  • Inter-process communication agreement: IPC mechanism achieved
  • Prompt Logic: AI interactive core message

Other Organiser:

  • Build Configuration for Package.json etc.
  • Model weights
  • User Data
  • Server peer code

History: Not the first

Here.No, Claude Code first leaked the source code.:

TimeEvents
February 2025Claude Code was also publicly discussed for including source Map when it first came out.
After February 2025lost source Map file from npm package
30 March 2026v2.1.88 Unexpected inclusion of source Map

While source Map was removed,The extraction of the source code has not stopped.I don't know. So far, there are several open warehouses on GitHub that have collated the restored source code. This post is part of our special coverage Egypt 2011. Getting nearly a thousand stars.

Impact assessment

For normal users

No direct security riskI don't know. The leak is Claude Code CLI client realization code, which does not involve model weights or user data.

Yes, Anthropic.

  • Internal architecture exposure: full transparency of core realization details
  • Security mechanism exposed.: Encryption and communication protocols can be analysed
  • Declining competitive advantage: Competing parties can study their technological realization
  • Hint leak: AI interactive core logic made public

To the developers community

  • You can learn about Claude Code's architecture.
  • Possible creation of open source-like projects
  • Auditable code for security researchers

Response to recommendations

Yes, Anthropic.

  • Immediate rehabilitationOther Organiser
  • Review process: check build processes to prevent similar incidents from recurring
  • Version Rollback: Consider withdrawing v2.1.88 version
  • Security audit: Assessment of the security impact of leak codes
  • Strengthening CI/CD: Add source Map detection to build process

For Developers

  • Check Dependency: confirm whether v2.1.88 versions are used
  • Waiting for restorationOther Organiser
  • Security update: Upgrade to restored version in time

Lessons and revelations

Source Map Management

Production environmentNever include source Map fileI don't know. Recommendations:

  • Clearly separate in the build process
  • Auto-Detect Using CI/CD Tool
  • Set up package size alert (v2.1.88 from 17MB to 31MB, obviously abnormal)

2. Construction process review

The event exposed the construction process:

  • v2.1.87 does not contain source Map
  • v2.1.88 Accident inclusion (one day only)
  • Description of uncertainties in build configuration

3. Rapid impact Response

After the incident became known, the community reacted quickly:

  • X fast dissemination
  • GitHub multi-source analysis repository
  • Security researchers start auditing.

Summary

Claude Code, the source leak was an accident.Typical build process accidentI don't know. While there is no direct security risk to ordinary users, Anthropic ' s problems with build process management have been exposed.

For AI,Code security is vital.I don't know. Core hints, API designs, safety mechanisms, if exposed, may be used by competitors, or may be studied by attackers.

The incident struck an alarm for all developers:Business Map management cannot be ignored, construction process review must be rigorousI don't know. In the AI era, code security is core competitiveness.

Building security is no big deal, source Map management needs caution!