Fake 'leaked Claude Code' GitHub repos push Vidar stealer and GhostSocks proxy

After Claude Code's source leaked via an npm source map, fake GitHub repos offering it spread Vidar malware. How to keep .map files out of your packages.

TechLogHub Engineering Team
April 2, 2026
4 min read
0 views

Share Article

Claude Code Leak Used to Push Infostealer Malware on GitHub

On 31 March 2026 the full client-side source of Anthropic's Claude Code CLI was exposed through a source map shipped in its npm package. Within days, attackers set up GitHub repositories offering the "leaked Claude Code" with "unlocked" features, and the downloads installed the Vidar infostealer and the GhostSocks proxy malware. There are two lessons here for developers: check what your build actually publishes, and be careful with code that arrives with a story attached.

What happened

According to Zscaler ThreatLabz, version 2.1.88 of the npm package @anthropic-ai/claude-code included a 59.8 MB JavaScript source map. It contained about 513,000 lines of unobfuscated TypeScript across 1,906 files, covering agent orchestration, permission and execution logic, hooks, MCP integrations and unreleased feature flags. Model weights and user data were not included. Anthropic described the cause as a release packaging error caused by human error, not a breach, and said no customer data or credentials were exposed. Copies spread quickly on GitHub, and Anthropic sent copyright takedown requests for some of them.

On 2 April Zscaler reported a repository by the GitHub user idbzoomh that claimed to be the leaked source, rebuilt with enterprise features unlocked and no message limits. It ranked near the top of Google results for searches like "leaked Claude Code". Its Releases section offered a 7-Zip archive named "Claude Code - Leaked Source Code" containing ClaudeCode_x64.exe, a Rust-based dropper. Running it installed Vidar v18.7, which steals browser credentials, cookies, card data and crypto wallets, and GhostSocks, which turns the machine into a proxy for criminal traffic. The actor updated the archives often. A second repository with the same code was also found, and The Register noted that at least two trojanized repositories were still online, one with hundreds of stars and forks.

The timing added risk. On the same day, the widely used axios npm package was briefly compromised in a separate supply-chain attack (between 00:21 and 03:29 UTC on 31 March, per Zscaler), so developers installing packages that morning faced two unrelated problems.

Who is affected

  • Developers who downloaded and ran binaries from repositories advertising the leaked or "unlocked" Claude Code.
  • Not affected: people who installed Claude Code through the official npm package or Anthropic's installer. The leak exposed source code, not a backdoor.
  • Any team publishing npm packages built with bundlers that create source maps by default.

What it means for developers and engineering teams

A source map is a JSON file that maps bundled or minified JavaScript back to the original files, and it can embed the full original source in its sourcesContent field. Zscaler notes that Bun generated a complete source map by default in this case, and *.map files were not excluded through .npmignore or the files field in package.json. This is an easy mistake for any team shipping a bundled CLI. Whatever is in the tarball when you run npm publish is public for good, even if you unpublish later.

The malware side is social engineering aimed at developers. A "leak" attracts people who want to read or run the code. A GitHub repository looks trustworthy, and a prebuilt .exe in Releases saves building from source. Huntress reported a similar GitHub-delivered GhostSocks campaign earlier in March. Source code projects don't need you to run an executable to read them, so a prebuilt binary is a warning sign.

What to do now

  1. If you ran a binary from a "leaked Claude Code" repo, treat the machine as compromised: isolate it, rebuild it, then rotate browser-stored passwords, session cookies, API keys, SSH keys and crypto wallets from a clean device.
  2. Install developer tools only from official sources, here the @anthropic-ai/claude-code npm package or Anthropic's documented installer.
  3. Check what you publish: run npm pack --dry-run and read the file list before every release.
  4. Use an allowlist, such as "files": ["dist/**/*.js", "dist/**/*.d.ts"] in package.json, rather than relying on .npmignore, and disable source maps in production bundles or keep them out of the package.
  5. Add a CI guard that fails the release if the tarball contains maps, for example npm pack --dry-run --json | grep -q '\.map"' && exit 1.
  6. Add a cool-down for new dependency versions so a briefly compromised release, like axios's, doesn't reach your lockfile automatically.

Related on TechLogHub

Sources

Stay Updated

Get the next deep dive in your inbox

Subscribe for product analysis, engineering explainers, and practical guides published on TechLogHub.

See what launched this week

One email a week: new and trending developer tools, fresh comparisons, and what shipped. Unsubscribe in one click.