← Back to Tech & Science

Anthropic Accidentally Leaks Claude Code Source Code in NPM Package

Tech & ScienceAI-Generated & Algorithmically Scored·

AI-generated from multiple sources. Verify before acting on this reporting.

SAN FRANCISCO — Anthropic, the artificial intelligence company behind the Claude chatbot, accidentally released the source code for its proprietary tool, Claude Code, within a public NPM package on April 1, 2026. The incident, which occurred during a routine software distribution process, exposed sensitive internal code to the public repository, raising immediate concerns about intellectual property security and potential vulnerabilities.

The leak was discovered shortly after the package was published to the Node Package Manager (NPM), a widely used platform for sharing JavaScript code. The package, intended for developers to integrate specific functionality, inadvertently included the full source code for Claude Code, a closed-source tool designed to assist developers in writing and debugging code. The exposure occurred at 00:33:36 UTC, as the package was made available for download.

Anthropic has acknowledged the error and stated that it is working to remove the compromised package from the NPM registry. The company has not yet provided details on the extent of the leak or whether the code has been downloaded by unauthorized parties. Security experts warn that the exposure of proprietary code could allow competitors to analyze Anthropic's technology or identify potential security flaws that could be exploited.

The incident highlights the risks associated with managing complex software supply chains, particularly for companies developing advanced AI technologies. NPM packages are a critical component of modern software development, allowing developers to share and reuse code. However, the sheer volume of packages and the speed of distribution can lead to accidental errors, such as the inclusion of sensitive files.

Anthropic has not commented on whether any malicious actors have accessed the leaked code or if the company has identified any specific threats resulting from the incident. The company is reportedly reviewing its internal processes to prevent similar errors in the future. The situation remains fluid, with developers and security researchers monitoring the NPM registry for any further developments.

The leak has sparked debate within the tech community about the balance between open-source collaboration and the protection of proprietary technology. While many developers advocate for transparency and open access to code, companies like Anthropic rely on closed-source models to maintain a competitive edge. The incident underscores the challenges of navigating this landscape, particularly as AI technologies become more integrated into everyday software development.

As of now, it is unclear how long the package remained publicly accessible before it was flagged and removed. Anthropic has not specified whether the leak was detected by internal monitoring systems or reported by external parties. The company is expected to provide further updates as the investigation continues.