- Anthropic employee accidentally leaked Claude Code source via npm map file
- Leak exposed 1,900 TypeScript files with 500K+ lines of code, quickly mirrored on GitHub
- Anthropic confirmed no customer data exposed, calling it a packaging error amid recent vulnerabilities like ShadowPrompt and Cloudy Day
An Anthropic employee accidentally leaked the source code for one of the most popular Artificial Intelligence (AI) assistants out there – Claude Code.
Security researcher Chaofan Shou posted on X, saying “Claude Code source code has been leaked via a map file in their npm registry!” The tweet itself was viewed more than 30 million times so far, with the numbers rising fast, showing just how popular the tool really is.
While CNBC says the leak is partial, The Register said it contained “the popular AI coding tool’s entire source code”.
Article continues below
Anthropic confirms leak
The internet reacted as the internet usually reacts – fast and remorseless, swiftly backing up the leak into a GitHub repository which has, by now, been forked tens of thousands of times.
In the GitHub upload it was said that the leak is a result of a reference to an unobfuscated TypeScript source code in the map file included in Claude Code’s npm package. The reference pointed to a .ZIP file sitting in Anthropic’s Cloudflare R2 storage bucket which contained 1,900 TypeScript files with more than 500,000 lines of code, full libraries of slash commands, and built-in tools.
Since then, Anthropic confirmed the news, saying this wasn’t an act of a malicious insider, or third party, but rather a mishap:
“No sensitive customer data or credentials were involved or exposed,” an Anthropic spokesperson said in a statement to CNBC. “This was a release packaging issue caused by human error, not a security breach. We’re rolling out measures to prevent this from happening again.”
These have been an intense couple of weeks for Anthropic. The company raised quite a few eyebrows with the speed at which it’s been shipping out new updates and features, even prompting major discussions on Reddit, where users argued the company’s been using, well, its own product.
“They’re getting high on their own supply,” one person said.
While releasing new features quickly is commendable, cybersecurity seems to be the flipside of that coin. In the last 10 days alone, we’ve had multiple stories about Claude being vulnerable to prompt injection and similar attacks. On March 27 2026, security researchers Koi Security found a major flaw in Claude Code’s Google Chrome extension that enabled zero-click attacks.
Speed at the expense of security?
Dubbed ShadowPrompt, the vulnerability could have allowed malicious actors to exfiltrate sensitive data.
A few days prior, on March 19, security researchers Oasis reported finding three vulnerabilities in Claude which, when used together, form a complete attack chain – from targeted victim delivery to sensitive data exfiltration. The researchers dubbed it Cloudy Day and responsibly disclosed it to Anthropic which quickly addressed it.
Users don’t seem to mind that much, though as, on the same day ShadowPrompt was discovered, Anthropic was forced to throttle its tools during peak hours to cope with rising demand.
“To manage growing demand for Claude we’re adjusting our 5 hour session limits for free/Pro/Max subs during peak hours. Your weekly limits remain unchanged”, said Thariq Shihipar, an engineer who works on Claude Code, in a post on X.

The best antivirus for all budgets
Follow TechRadar on Google News and add us as a preferred source to get our expert news, reviews, and opinion in your feeds. Make sure to click the Follow button!
And of course you can also follow TechRadar on TikTok for news, reviews, unboxings in video form, and get regular updates from us on WhatsApp too.
https://cdn.mos.cms.futurecdn.net/bz3rdapg2iEBxq8QCGjgyc-970-80.jpg
Source link




