Hackers News Hackers News
  • CyberSecurity News
  • Threats
  • Attacks
  • Vulnerabilities
  • Breaches
  • Comparisons

Social Media

Hackers News Hackers News
  • CyberSecurity News
  • Threats
  • Attacks
  • Vulnerabilities
  • Breaches
  • Comparisons
Search the Site
Popular Searches:
technology Amazon AI
Recent Posts
Best Software-Defined Perimeter (SDP) Solutions of 2024
August 17, 2026
Threema Messaging Service Suffers Massive DDoS Attack
August 17, 2026
HoneyMyte CoolClient Backdoor Uses Signed Kernel Rootkit to Hide Itself
August 17, 2026
Home/CyberSecurity News/Anthropic Claude Source Code Leaked Via npm Registry
CyberSecurity News

Anthropic Claude Source Code Leaked Via npm Registry

Key Takeaways Anthropic’s proprietary Claude Code CLI tool’s complete TypeScript source code was inadvertently exposed. A security researcher discovered the leak in a misconfigured npm...

Jennifer sherman
Jennifer sherman
March 31, 2026 3 Min Read
66 0

Key Takeaways

  • Anthropic’s proprietary Claude Code CLI tool’s complete TypeScript source code was inadvertently exposed.
  • A security researcher discovered the leak in a misconfigured npm package containing a source map (`.map`) file.
  • The exposed codebase includes over 512,000 lines of code, internal API logic, authentication flows, and unreleased feature flags.
  • The leak raises significant intellectual property concerns for Anthropic.

Anthropic, a prominent AI research company, has inadvertently exposed the complete TypeScript source code for its proprietary Claude Code command-line interface (CLI) tool. The sensitive code was discovered by a security researcher within a misconfigured npm package, which contained a source map (`.map`) file directly referencing the tool’s unobfuscated codebase hosted on Anthropic’s cloud infrastructure.

Table Of Content

  • Key Takeaways
  • What Was Exposed
  • How Source Maps Cause Leaks
  • What You Should Do

The disclosure was made public on March 31, 2026, by researcher Chaofan Shou, who announced, “Claude code source code has been leaked via a map file in their npm registry!” Shou’s post highlighted the existence of the exposed code and provided links.

The @anthropic-ai/claude-code npm package reportedly included a source map file that linked to the full, unminified TypeScript source. This source was available for direct download as a ZIP archive from Anthropic’s R2 cloud storage bucket. Subsequently, the original, unmodified source code has been mirrored and preserved in a public GitHub repository under the nirholas/claude-code backup branch.

What Was Exposed

The leaked codebase encompasses the entirety of the Claude Code’s src/ directory, containing approximately 1,900 files and over 512,000 lines of code. The tool is written in strict TypeScript, leveraging the Bun runtime and a React + Ink terminal UI framework. This extensive disclosure impacts every critical subsystem of the CLI tool.

Among the key files confirmed in the leak are QueryEngine.ts, comprising roughly 46,000 lines, which controls the core LLM API engine, including streaming, tool loops, and token tracking. Also exposed is Tool.ts, approximately 29,000 lines, defining all agent tool types and permission schemas, alongside commands.ts, about 25,000 lines, responsible for registering and executing the tool’s slash commands.

The exposed architecture details around 40 distinct agent tools, such as BashTool, FileReadTool, FileEditTool, and AgentTool for sub-agent spawning. Additionally, approximately 85 slash commands were revealed, covering functionalities like Git workflows, code review, memory management, and multi-agent orchestration.

Intriguingly, the leak also unveiled internal feature flags, including PROACTIVE, VOICE_MODE, BRIDGE_MODE, and KAIROS. These flags suggest product features that have not yet been publicly released by Anthropic, offering a glimpse into future development.

How Source Maps Cause Leaks

Source map files (.map) are standard components in web development, used by developers to map compiled or minified JavaScript back to its original source code. This functionality is crucial for debugging applications in production environments.

However, when these files are inadvertently bundled into production npm releases, they can expose proprietary source code to anyone with the knowledge to locate them, effectively nullifying any obfuscation efforts. This is not an isolated incident for Anthropic; a similar source map exposure was reportedly addressed and patched in early 2025, indicating a recurring vulnerability in their deployment practices.

The current breach raises significant intellectual property concerns for Anthropic. The exposed code contains internal API client logic, OAuth 2.0 authentication flows, permission enforcement mechanisms, multi-agent coordination strategies, and even details of undisclosed feature pipelines. As of the time of writing, Anthropic has not released a public statement regarding this incident.

What You Should Do

  • Organizations integrating Claude Code into their development workflows should closely monitor Anthropic’s official security advisories for updates.
  • Developers are strongly advised to review the official npm registry for patched releases of the @anthropic-ai/claude-code package.
  • Avoid using or relying on third-party mirrors or unofficial distributions of the leaked source code to prevent potential security risks and maintain code integrity.

Disclaimer: HackersRadar reports on cybersecurity threats and incidents for informational and awareness purposes only. We do not engage in hacking activities, data exfiltration, or the hosting or distribution of stolen or leaked information. All content is based on publicly available sources.

Tags:

BreachCybersecurityPatchSecurity

Share Article

Jennifer sherman

Jennifer sherman

Jennifer is a cybersecurity news reporter covering data breaches, ransomware campaigns, and dark web markets. With a background in incident response, Jennifer provides unique insights into how organizations respond to cyber attacks and the evolving tactics of threat actors. Her reporting has covered major breaches affecting millions of users and has helped organizations understand emerging threats. Jennifer combines technical knowledge with investigative journalism to deliver in-depth coverage of cybersecurity incidents.

Previous Post

CareCloud Data Breach Exposes Patient Data After IT Infrastructure Hack

Next Post

New ResokerRAT Malware Uses Telegram for Remote Control, Steals Screenshots

No Comment! Be the first one.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Popular Posts
Z.ai Launches GLM-5.3, Boosting Cybersecurity and Coding Capabilities
August 17, 2026
Critical GeoServer SQLi Vulnerability Allows Remote Code Execution
August 17, 2026
MessiahGPT AI Model Automates Ransomware and Phishing Attacks
August 17, 2026
Top Authors
Marcus Rodriguez
Marcus Rodriguez
David kimber
David kimber
Jennifer sherman
Jennifer sherman
Let's Connect
156k
2.25m
285k

Related Posts

Jennifer sherman
By Jennifer sherman
Threats

GlassWorm Attacks macOS via Malicious VS Code…

January 1, 2026
Emy Elsamnoudy
By Emy Elsamnoudy
Attacks

ClickFix Attack Hides Malicious Code via Stegan Security

January 1, 2026
Sarah simpson
By Sarah simpson
Vulnerabilities

MongoBleed Detector Tool Released to Detect MongoDB Vulnerability(CVE-2025-14847)

January 1, 2026
Emy Elsamnoudy
By Emy Elsamnoudy
Breaches

Conti Ransomware Gang Leaders & Infrastructure Exposed

January 1, 2026
Hackers News Hackers News
  • [email protected]

Quick Links

  • Contact Us
  • Privacy Policy
  • Terms of service

Categories

Attacks
Breaches
Comparisons
CyberSecurity News
Threats
Vulnerabilities

Let's keep in touch

receive fresh updates and breaking cyber news every day and week!

All Rights Reserved by HackersRadar ©2026

Follow Us