Anthropic accidentally published a 59.8 MB JavaScript source map inside the Claude Code npm package. The file exposed roughly 513,000 lines of unobfuscated TypeScript across 1,906 files. The code was forked thousands of times before the mistake was noticed.

Attackers then used the attention for their own purposes. They created fake "leaked Claude Code" repositories on GitHub that delivered the Vidar infostealer, a type of malware that steals saved passwords, browser cookies and crypto wallet data.

What is going on

A source map is a helper file that translates compressed, machine-friendly JavaScript back into the original, readable code. Developers use it to debug problems. If it ships to the public, anyone can read the original source.

Think of a shredded document that comes with instructions for reassembling it. The shredding looks like protection until the instructions are attached to the same envelope.

The second part of the story is social. Once people started searching for the leaked code, criminals published repositories that looked like copies of it and hid malware inside.

Who is affected

Directly, this concerns the Claude Code npm package and anyone who downloaded a so-called leaked copy from an unofficial GitHub repository.

Indirectly, it concerns any team that ships JavaScript bundles or publishes npm packages. The same mistake can expose your internal code, comments and logic on a normal business website or web app.

What to do now

  1. Turn off source maps in production builds, or strip the map files before you deploy. Most build tools have a single setting for this.
  2. Run npm pack --dry-run before publishing a package. It lists every file that would be included, so you can spot large or unexpected files.
  3. Do not download or run "leaked" code from unofficial repositories, however interesting it looks.
  4. If anyone on your team did run such code, change the passwords stored in their browser and any API keys on that machine.
  5. Ask your developer or agency to check whether your live site currently serves .map files.

How to check your own site

Our free Website Security Check reviews your public setup: outdated CMS versions, known-vulnerable plugins, missing security headers, weak TLS and email-authentication gaps. If you also want exposed-file and secret checks, which are the closest match to a stray source map, you can run a full scan against a site whose ownership you have verified.

Source: BleepingComputer, February 2026.