By using this site, you agree to the Privacy Policy and Terms of Use.
Accept
World of SoftwareWorld of SoftwareWorld of Software
  • News
  • Software
  • Mobile
  • Computing
  • Gaming
  • Videos
  • More
    • Gadget
    • Web Stories
    • Trending
    • Press Release
Search
  • Privacy
  • Terms
  • Advertise
  • Contact
Copyright © All Rights Reserved. World of Software.
Reading: Anthropic Accidentally Exposes Claude Code Source via npm Source Map File
Share
Sign In
Notification Show More
Font ResizerAa
World of SoftwareWorld of Software
Font ResizerAa
  • Software
  • Mobile
  • Computing
  • Gadget
  • Gaming
  • Videos
Search
  • News
  • Software
  • Mobile
  • Computing
  • Gaming
  • Videos
  • More
    • Gadget
    • Web Stories
    • Trending
    • Press Release
Have an existing account? Sign In
Follow US
  • Privacy
  • Terms
  • Advertise
  • Contact
Copyright © All Rights Reserved. World of Software.
World of Software > News > Anthropic Accidentally Exposes Claude Code Source via npm Source Map File
News

Anthropic Accidentally Exposes Claude Code Source via npm Source Map File

News Room
Last updated: 2026/04/07 at 7:44 AM
News Room Published 7 April 2026
Share
Anthropic Accidentally Exposes Claude Code Source via npm Source Map File
SHARE

Security researcher Chaofan Shou discovered on March 31 that Anthropic’s Claude Code CLI tool had its full TypeScript source code sitting in plain sight on the public npm registry. Version 2.1.88 of the @anthropic-ai/claude-code package shipped with a source map file that should never have been included. Shou posted the finding on X, where it attracted millions of views. Within hours, the complete codebase had been archived to multiple GitHub repositories, rapidly accumulating tens of thousands of stars and forks.

In a statement to CNBC, Anthropic called it “a release packaging issue caused by human error, not a security breach,” adding that no customer data or credentials were involved. The company said it is rolling out measures to prevent a recurrence.

So what went wrong? A .map file, the kind of debugging artifact that maps minified production code back to its original source, got bundled into the published npm package. That file referenced the complete, unobfuscated TypeScript source hosted on Anthropic’s own R2 cloud storage bucket, making it directly downloadable as a ZIP archive. Claude Code uses the Bun runtime, which generates source maps by default unless you explicitly disable them. Preventing this is not exotic: add *.map to .npmignore, maintain an explicit whitelist in package.json’s files field, or run npm pack –dry-run before publishing to audit what gets included.

As developer and security analyst Gabriel Anhaia wrote in his DEV Community analysis:

A single misconfigured .npmignore or files field in package.json can expose everything.

Notably, this is reportedly not the first time Anthropic has shipped source maps in its npm packages. Earlier versions in 2025 also included full source maps before being pulled from the registry.

(Source: Tweet on X)

It is worth noting that this is the Claude Code CLI tool, not the claude.ai web application or the LLM models themselves. As one commenter on Reddit put it:

While technically not the end of the world since frontend clients should be assumed to be reverse-engineerable anyway, it’s still a massive oops to leak the entire, unobfuscated source code, since there’s a treasure trove of extremely valuable system prompts, context / query / RAG engine design, coordinator / orchestrator logic, and the overall agent architecture in there. It’s basically a reference manual for how to design an LLM-based agent.


Not everyone agreed the damage was as severe as headlines suggested. Another commenter countered that:

Anyone who really wanted that already had it. The relevant prompts were available as free strings in the executable. The entire source code that leaked was available as minified JS.

Because Claude Code is a JavaScript application bundled with a runtime, the minified source has always been technically accessible, though having the full annotated TypeScript with original variable names, comments, and module structure provides a qualitatively different level of exposure.

What the codebase reveals is a system far more complex than Claude Code’s terminal interface suggests. Spanning approximately 1,900 TypeScript files and over 512,000 lines of code, the source has been analyzed on DEV Community, Hacker News, and in a detailed GitHub repository breakdown. Among the findings: roughly 40 discrete tools, each with its own permission gating. A query engine of approximately 46,000 lines handles LLM API calls, streaming, caching, and orchestration. Multi-agent coordination allows spawning and managing parallel worker agents. IDE bridge integrations use JWT authentication. A persistent memory system rounds out the architecture.

Buried in the source are multiple unreleased features hidden behind feature flags. KAIROS describes an autonomous daemon mode where Claude Code operates as a background agent, performing memory consolidation while the user is idle. ULTRAPLAN appears designed for offloading complex planning tasks to cloud infrastructure. BUDDY is a Tamagotchi-style AI companion complete with species, rarity tiers, and stats. Internal model codenames are visible too, with Capybara mapping to a Claude 4.6 variant and Fennec to an Opus 4.6 variant.

One detail drew particular attention: a subsystem called “Undercover Mode.” Designed to prevent Claude Code from revealing internal information when contributing to public open-source repositories, the system prompts it to inject instructions that instruct the model not to reference internal codenames, unreleased version numbers, internal Slack channels, or the fact that it is an AI. The irony was not lost on observers. Anthropic built an entire subsystem to prevent its AI from leaking internal details, but a build configuration oversight exposed the entire codebase.

A Reddit commenter highlighted the security implications of the leaked orchestration logic:

If you know where and how prompt injection defenses are applied, you can more easily find a bypass. If you know the system prompts, an attacker doesn’t have to guess the preamble anymore to craft content that uses the right language to subvert the model.

Compounding the timing, a separate and unrelated supply-chain attack hit the axios npm package on the same day, first reported by StepSecurity. Between 00:21 and 03:29 UTC on March 31, malicious versions of axios (1.14.1 and 0.30.4) containing a Remote Access Trojan were published to npm. Because Claude Code depends on axios, anyone who installed or updated it during that window may have pulled in the compromised dependency. Developers should check their lockfiles for these specific versions or the dependency plain-crypto-js.

For enterprise teams that rely on Claude Code as part of their development infrastructure, this raises uncomfortable questions. The source map exposure is reportedly the third instance of this class of error. It also comes less than a week after internal documents describing an upcoming model called Claude Mythos were discovered in a publicly accessible data cache, making this the second significant exposure in rapid succession. Anthropic has not yet publicly detailed specific remediation steps beyond unpublishing the affected npm versions.

Sign Up For Daily Newsletter

Be keep up! Get the latest breaking news delivered straight to your inbox.
By signing up, you agree to our Terms of Use and acknowledge the data practices in our Privacy Policy. You may unsubscribe at any time.
Share This Article
Facebook Twitter Email Print
Share
What do you think?
Love0
Sad0
Happy0
Sleepy0
Angry0
Dead0
Wink0
Previous Article Instagram Analytics Guide: Tools, Metrics, & Insights | Instagram Analytics Guide: Tools, Metrics, & Insights |
Next Article Safaricom begins migrating M-PESA users to My OneApp platform Safaricom begins migrating M-PESA users to My OneApp platform
Leave a comment

Leave a Reply Cancel reply

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

Stay Connected

248.1k Like
69.1k Follow
134k Pin
54.3k Follow

Latest News

How to Get More Views on TikTok |
How to Get More Views on TikTok |
Computing
PlayStation Plus Subscribers Can Play Tomb Raider and More All April Long
PlayStation Plus Subscribers Can Play Tomb Raider and More All April Long
News
The case for banning cookie banners
The case for banning cookie banners
News
I’ve Tested Countless Mesh Systems. Here Are the Routers I Recommend
I’ve Tested Countless Mesh Systems. Here Are the Routers I Recommend
Gadget

You Might also Like

PlayStation Plus Subscribers Can Play Tomb Raider and More All April Long
News

PlayStation Plus Subscribers Can Play Tomb Raider and More All April Long

4 Min Read
The case for banning cookie banners
News

The case for banning cookie banners

2 Min Read
Why a former AirPods engineer is now building heat pumps |  News
News

Why a former AirPods engineer is now building heat pumps | News

5 Min Read
Schools Turn to Drones to Counter Active Shooters
News

Schools Turn to Drones to Counter Active Shooters

0 Min Read
//

World of Software is your one-stop website for the latest tech news and updates, follow us now to get the news that matters to you.

Quick Link

  • Privacy Policy
  • Terms of use
  • Advertise
  • Contact

Topics

  • Computing
  • Software
  • Press Release
  • Trending

Sign Up for Our Newsletter

Subscribe to our newsletter to get our newest articles instantly!

World of SoftwareWorld of Software
Follow US
Copyright © All Rights Reserved. World of Software.
Welcome Back!

Sign in to your account

Lost your password?