Blog Content

Home – Blog Content

Claude Code leak: it’s not the model that leaked, it’s everything around it

On March 31, 2026, several media outlets as The Register or VentureBeat picked up the same story: the Claude Code Leak ! Anthropic had accidentally exposed a large portion of Claude Code’s source code, its developer assistant tool.

A lot of people read it too fast. What leaked wasn’t the Claude models. It was the tool. The architecture, the orchestration layer, the way everything works around the LLM. Technically, that’s a different thing. And it changes quite a bit about how you should read this incident.

What actually happened with this Claude Code leak

During a routine update (version 2.1.88), a debug file, a 59.8 MB .map source map, was accidentally bundled into the package published on npm. The cause: a missing line in the .npmignore file. Claude Code is built on the Bun runtime, which generates source maps by default. Nobody added the necessary exclusion. The result: roughly 512,000 lines of TypeScript, spread across 1,906 files, became publicly accessible from Anthropic’s own Cloudflare R2 bucket.

At 4:23 AM, security researcher Chaofan Shou posted the direct download link on X. Within hours, the codebase had been mirrored on GitHub and forked more than 41,500 times. Anthropic confirmed it: a packaging error caused by human error, no customer data or credentials exposed. And it wasn’t the first time. A similar incident had already occurred in February 2025.

Why a source map changes everything

A source map is a debugging tool. It bridges minified, compiled code (which is essentially unreadable) and the original source. Without it, understanding what a compiled tool actually does takes serious effort.

With it, things move much faster. You can see how the system is structured, can reproduce behaviors and can spot potential vulnerabilities without having to guess. What leaked here was precisely Claude Code’s intermediate layer: the orchestration logic, the hooks, the permission handling, the system prompts. In practice, the internal instruction manual for the tool.

The risk is rarely where you’re looking

There’s a fairly common blind spot in AI security discussions: everyone focuses on the model and forgets everything surrounding it.

An AI system in production isn’t just an LLM. It’s a stack: orchestration, connectors, workflows, permission management, logs, control rules. That’s the layer that leaked here, not the model itself.

One more point that often gets missed: on the same day, a separate supply-chain attack hit the axios npm package, with a Remote Access Trojan embedded in two malicious versions. Anyone who updated Claude Code between 00:21 and 03:29 UTC that morning may have unknowingly installed that malware. The two incidents are unrelated, but the timing makes clear just how much the technical stack is an attack surface in its own right.

Sovereignty means the whole chain

The sovereignty debate in AI often circles around one question: where is the model hosted? Fair question. But in practice, the surrounding tools matter just as much. Who controls access, how data flows, where it’s stored, who can audit what.

A leak on the tooling side is a reminder of something basic: dependency doesn’t stop at the model. It runs through the entire chain.

What to take away from this Claude Code Leak

If you use or deploy AI agents, here are a few concrete habits worth building:

  • Map your full stack clearly: models, tools, dependencies
  • Define exactly which data can flow and which can’t
  • Apply the principle of least privilege to access rights
  • Keep usable logs without exposing sensitive data
  • Manage updates carefully: validation, rollback capability
  • Hold your vendors accountable: contracts, audits, commitments
  • Have an incident response plan, not just the intention to write one someday

Nothing groundbreaking. But basics that, clearly, aren’t always in place.

Read more : Generative AI in the enterprise: compliance starts long before you pick a tool

Leave a Reply

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

Serendipai, your dedicated AI partner

A training provider recognized by the Luxembourg government and Fit4AI-accredited by Luxinnovation

 
 

 

SerendipAI

logo_luxinnovation

 

 
 

 

 

Fit4AI

logo_min_edu

 
 

 

 

© All rights reserved – Hosted by our partner LaNetCie