Claude Code Source Code Leak: What the 512,000-Line npm Error Exposed and How to Check Your Installs

Anthropic published version 2.1.88 of its Claude Code npm package with a 59.8 MB source map that exposed 512,000 lines of unobfuscated TypeScript across 1,906 files, VentureBeat reported. The company’s statement, quoted by Ars Technica, calls it “a release packaging issue caused by human error, not a security breach.” The leak was discovered on 31 March 2026. What came out was the command line client, not the models, and Anthropic told CNBC that no sensitive customer data or credentials were involved. Whether your own machines were exposed depends on a lockfile check, not on the date, and the check is below. The latest Claude Code release as of 13 November 2026 is v2.1.323, shipped on 12 November 2026, according to the Claude Code changelog.

Google · Preferred Sources

Don't miss new tech stories on Google

Add Tech Insider once in the Google app and our stories appear in your news suggestions.

Add Now

What shipped in 2.1.88, who found it and which build default caused it

VentureBeat counts 1,906 TypeScript files and 512,000 lines in the exposed source. Ars Technica describes almost 2,000 files and more than 512,000 lines, so the two counts agree. Ars is explicit about scope: the source of the Claude Code command line application, “not the models themselves.” Anthropic’s spokesperson told CNBC that “No sensitive customer data or credentials were involved or exposed,” and the Ars report carries the company’s pledge: “We’re rolling out measures to prevent this from happening again.”

Layer5’s engineering write-up says security researcher Chaofan Shou spotted the exposure at about 4:23 AM ET and posted a download link on X, and that the post passed 21 million views. That time is Eastern, which matters in the next section.

The cause, per Layer5, was a build default plus a missed exclusion. Claude Code is built on Bun, which Anthropic acquired in late 2025, and Bun generates source maps by default. Someone on the release team failed to add *.map to .npmignore, so the map shipped inside the package. Layer5 also points to a possibly related Bun bug, oven-sh/bun#28001, filed on 11 March, which reports source maps being served in production mode despite documentation saying they should be disabled. Ars Technica notes that the map file could be used to access the entirety of the source, which is why a debug artifact amounted to a full disclosure.

Installed on 31 March? Check the lockfile, because the axios window and the discovery time use different clocks

VentureBeat warned that any team that installed or updated Claude Code via npm between 00:21 and 03:29 UTC on 31 March may have pulled both the exposed source and the unrelated axios malware. The end time is off. Per the axios maintainers’ post-mortem (issue 10636 in the axios repository on GitHub, checked 13 November 2026), the malicious axios 1.14.1 and 0.30.4 were live from 00:21 to 03:15 UTC and removed at 03:15 UTC. The 03:29 UTC time is when the plain-crypto-js package was removed from npm.

EventTime as reportedClockSource
Malicious axios 1.14.1 and 0.30.4 live00:21 to 03:15UTCaxios post-mortem
plain-crypto-js removed from npm03:29UTCaxios post-mortem
Install window in VentureBeat’s warning00:21 to 03:29UTCVentureBeat
Shou spots the exposureabout 4:23 AMEastern, equal to 08:23 UTCLayer5
Bun bug oven-sh/bun#28001 filed11 Marchdate onlyLayer5

Eastern Daylight Time was in effect on 31 March, four hours behind UTC, so 4:23 AM ET is 08:23 UTC. That is just over five hours after the malicious axios versions were removed. Layer5 gives Eastern time, so the conversion has to be made before the time is set beside the UTC axios times. Shou’s post is an upper bound on when 2.1.88 went live; it does not show that any install overlapped the axios window. The two events are also separate: a project can have resolved a bad axios without ever installing 2.1.88, and the reverse. The test is therefore about your lockfiles and install logs, not the date.

These commands only read. Run them in a project root, and on any CI image that installs the CLI:

set -eu
claude --version
npm ls -g --depth=0 @anthropic-ai/claude-code || true
npm ls axios plain-crypto-js || true
grep -sn 'plain-crypto-js' package-lock.json yarn.lock pnpm-lock.yaml || true

A hit on plain-crypto-js, or axios resolved to 1.14.1 or 0.30.4, means reading the axios post-mortem and treating that host and any secrets it held as exposed. A clean current lockfile is not proof for a CI job that has regenerated it since, so check the lockfile from the build that ran in the window and that job’s install log.

Moving off npm: the native installer, v2.1.323 and the lookalike packages

Anthropic’s install troubleshooting page tells people who previously installed with npm and are hitting npm-specific permission errors to switch to the native installer, and npm remains available as an alternative. The page is not written about the leak, but the npm channel is the one that carried 2.1.88, and the native installer takes the package manager out of the path.

Check the version you run with claude --version, as the changelog itself advises. A machine still reporting 2.1.88 should be replaced, not patched around.

There is also a follow-on risk. Coder’s analysis reports that attackers registered npm packages mimicking Anthropic’s internal tooling within 24 hours, targeting developers exploring the leaked source. The practical rule is to install only the official package or the native installer and never build from a mirror. In our assessment this is the part of the story that can still hurt a team: the leaked source cannot harm a machine that never runs it, but a squatted package or a bad axios release can.

ULTRAPLAN, Undercover Mode and the codenames: who reported each

Layer5 says the codebase held 44 feature flags gating over 20 unshipped capabilities, and VentureBeat also reports 44 unreleased feature flags. Layer5’s items:

  • ULTRAPLAN: a feature that offloads complex planning to a remote cloud session running Opus 4.6 with up to 30 minutes of think time.
  • Undercover Mode: a mode that injects a system prompt telling Claude never to mention that it is an AI and to strip Co-Authored-By attribution when contributing to external repositories. Layer5 says it activates for Anthropic employees, has no force-off switch, and stays on if the system is not confident it is in an internal repo.
  • Codenames and benchmarks: Capybara maps to Claude 4.6, Fennec to Opus 4.6 and Numbat to an unreleased model. Internal benchmarks showed Capybara v8 with a 29-30% false claims rate, a regression from 16.7% in v4.
  • Architecture: about 40 tools in a plugin architecture and a 46,000-line query engine, with React and Ink for terminal rendering.
Reported itemReported byWhat it rests on
Release packaging issue, human error, not a breachAnthropic, via Ars TechnicaAnthropic’s own quoted statement
No sensitive customer data or credentials involvedAnthropic spokesperson, via CNBCAnthropic’s own quoted statement
44 unreleased feature flagsLayer5Layer5’s account of the leaked code
ULTRAPLANLayer5Layer5’s account of the leaked code
Undercover ModeLayer5Layer5’s account of the leaked code
Codenames and Capybara v8 benchmark figuresLayer5Layer5’s account of the leaked code
Architecture figures (tools, query engine)Layer5Layer5’s account of the leaked code

The codename and benchmark rows deserve the most caution. They come from one secondary source and describe internal numbers, not published results, so the false claims rates say nothing reliable about the Claude models you use. Undercover Mode, by Layer5’s description, concerns Anthropic staff contributing to outside repositories rather than what the tool does in your sessions.

In our assessment the reportable fact is narrow: these capabilities exist behind flags in the code. A flag carries no ship date, price or guarantee of release, so plan around what Anthropic documents and ships.

A public guardrail map: 23 shell checks and a CLAUDE.md that survives compaction

Ars Technica’s warning is that bad actors looking for vulnerabilities have a map for bypassing the guardrails Anthropic has put in place. VentureBeat gives that map some shape: 2,500 lines of bash security validation that run 23 sequential checks on every shell command. Readable checks lower the cost of crafting an input that slips past them. That matters most to anyone running the tool against untrusted repositories, but it changes attacker effort, and the exposed material was the client application, not the models.

The attack path analysts have described is more specific. Straiker’s analysis, reported by VentureBeat, describes a poisoned instruction in a cloned repository’s CLAUDE.md file that survives the compaction pipeline, is laundered through summarisation and re-emerges as something the model treats as a genuine user directive. With the compaction code readable by anyone, designing such a payload deliberately gets easier. Three habits follow:

  • Treat CLAUDE.md and other instruction files that arrive with a cloned repository as untrusted input, and read them before opening the repository in an agent session.
  • Keep approval prompts on for shell commands in repositories you did not write.
  • Scan commits for secrets. GitGuardian’s State of Secrets Sprawl 2026 found Claude Code-assisted commits leaked secrets at a 3.2% rate against a 1.5% baseline across public GitHub commits. That is a separate dataset, not a consequence of the leak.

8,000 copies removed, one repository and 96 forks kept: takedowns, claw-code and a thin copyright claim

VentureBeat reports that Anthropic’s copyright takedown requests briefly removed more than 8,000 copies and adaptations from GitHub, and that GitHub restored access to the affected forks. As of 13 November 2026, GitHub’s own retraction notice in its public DMCA repository says the notice was retracted for all repositories except nirholas/claude-code and the 96 fork URLs individually listed in the original notice, so more than one repository stayed covered. Layer5 reports that a clean-room rewrite, claw-code, reached 50,000 stars in about two hours and over 55,800 stars and 58,200 forks by 1 April.

The legal footing is not simple. VentureBeat quotes Gartner noting that Claude Code is 90% AI-generated, per Anthropic’s own disclosures, and that under U.S. copyright law requiring human authorship the leaked code carries diminished intellectual property protection. That makes forking or running a mirror a question for your counsel, not something a takedown history settles. Our advice on the practical side is simpler: the supply-chain risk in the previous sections is reason enough to keep mirrors and rewrites off company machines.

Our assessment is that the harness logic, meaning the tool loop, prompts and permission checks, is replicable from the exposed source, while the models were not exposed. Ars Technica says it is hard to predict how much of a problem this will be in a few months; it does not change what a customer should do.

Two leaks in five days: the Mythos drafts, Anthropic’s commitment and the pricing since

VentureBeat notes this was the second leak in five days: a separate CMS misconfiguration had already exposed nearly 3,000 unpublished internal assets, including draft announcements for an unreleased model called Claude Mythos. Tech Insider has written about Claude Fable 5.1 and Mythos 5.1 shipping after the leak and about Claude Mythos and Project Glasswing.

Anthropic’s pricing page, checked on 13 November 2026, lists Claude Fable 5.1 at $10 per million input tokens and $50 per million output tokens, with cache reads at $0.25 per million, and Claude Sonnet 5 at $2 and $10. Those listed prices, not codenames from the leak, are the figures to budget against.

In our assessment, two process failures five days apart signal a release-hygiene problem, not a customer-data problem: Anthropic’s statement on the packaging incident says no sensitive customer data or credentials were involved. The sensible response is not abandoning the tool but removing the npm path and pinning what you run.

Anthropic’s stated commitment is that it is “rolling out measures to prevent this from happening again.” For a team, the short list is to move to the native installer, check lockfiles and CI install logs for axios 1.14.1, axios 0.30.4 and plain-crypto-js, and treat instruction files that arrive with a cloned repository as untrusted.

Marcus Chen

Marcus Chen

PC hardware, storage and engineering

Marcus Chen covers PC hardware, storage and engineering for Tech Insider: processors, graphics cards, SSDs and hard drives, home servers and backup, and the engineering choices behind them. He builds comparisons from manufacturers' specifications, published independent test results and Tech Insider's own calculations, and writes plainly about what the evidence supports.

View all articles