Anthropic
Anthropic accidentally published the Claude Code source. The malware authors provided the 'unlocked' version.
Anthropic's accidental leak of 513,000 lines of Claude Code became a viral lure for Vidar malware. A forensic post-mortem of a 60MB packaging disaster.

On March 31, 2026, the artificial intelligence industry experienced what can only be described as a pedestrian disaster with global consequences. Anthropic, a company that has built its brand on the bedrock of "Constitutional AI" and rigorous safety protocols, pushed version 2.1.88 of its @anthropic-ai/claude-code package to the npm registry. It was a routine update that arrived with an uninvited 59.8 MB guest: a comprehensive JavaScript Source Map (.map file) containing the entire client-side logic of their flagship agentic orchestrator. This was not a sophisticated breach of the firm's firewalls, but a packaging error that exposed over half a million lines of human-readable TypeScript, revealing the inner mechanics of how Claude interacts with file systems and manages its internal "thought" processes TechRadar.
The Claude Code leak confirms that the 'AI gold rush' has created a developer psychology where the desire for competitive advantage consistently overrides established security hygiene. This hunger for accessing state-of-the-art orchestrators has made AI source leaks the most potent social engineering lures of 2026. This incident serves as a clinical demonstration of how the frantic pace of the AI arms race has rendered the traditional security boundary of "trusting the vendor" obsolete. Even the most safety-conscious organizations are now failing at basic supply-chain maintenance, proving that a billion-dollar valuation does not buy immunity from a misconfigured build script.
The 60MB Oversight: Anatomy of a Pipeline Failure
The technical root of the incident lies in the functionality of a Source Map. In modern web and Node.js development, Source Maps are debugging files that map transpiled or minified JavaScript back to its original, human-readable TypeScript source code. While essential for development environments, they are typically excluded from production releases to minimize attack surfaces and protect intellectual property. On March 31, Anthropic’s build pipeline failed to prune this file, resulting in the public exposure of 513,000+ lines of unobfuscated code across 1,906 individual files Zscaler.
The scale of the exposure was documented by security researcher Chaofan Shou, who first publicized the leak on social media. The files did not merely contain utility functions; they revealed the "orchestrator logic"—the proprietary sequence of prompts and decision-making trees that allow Claude Code to act as an autonomous agent. According to reports from TechRadar, the leak exposed security internals and the specific guardrails Anthropic uses to prevent their agent from being turned into a weapon for automated hacking. For the developer community, this was more than a leak; it was a blueprint for the state of the art in agentic orchestration.
The build failure likely occurred during a transition to a more aggressive deployment cycle The Register. Automated testing often ignores the contents of the final distribution tarball, focusing instead on whether the code "works." This oversight is particularly embarrassing for a company that advocates for AI-driven code reviews. It appears that while the AI was busy reviewing the logic, no one was checking the size of the deployment package.
Inside the Orchestrator: System Prompts and Tool Logic
A significant portion of the leaked code detailed the Model Context Protocol (MCP) implementations that Anthropic uses to connect Claude to local environments. These files contained the specific "thought" templates Claude uses to decompose complex tasks into terminal commands. By reading the source, researchers were able to see exactly how Claude handles credential prompts and file system permissions Dark Reading. This level of transparency is usually reserved for open-source projects, not proprietary enterprise tools.
The leak included the core "System Prompts" and the internal "Tool Use" definitions that govern Claude's autonomous behavior, essentially providing a map for jailbreakers to bypass safety layers.
The exposed code also revealed how Anthropic manages "latency-optimized" prompts—shortened instructions designed to save tokens and speed up response times. These prompts showed a surprising amount of hard-coded logic for handling specific edge cases in terminal environments like Windows PowerShell and Zsh TechRadar. This reveals that the "intelligence" of the agent is often supplemented by a massive collection of "if-then" statements written by human engineers. It turns out that even the most advanced AI agents require a significant amount of manual plumbing to survive in the real world.
The Descent into Infostealers: From Leak to Infection
The timeline of the fallout moves with a velocity that highlights the current desperation for AI secrets. Within hours of the initial disclosure, the npm package was pulled, but the damage was already done as mirrors began appearing on decentralized platforms.
- March 31, 2026 (14:00 UTC): Version 2.1.88 is published to the npm registry including the 59.8 MB map file.
- March 31, 2026 (16:30 UTC): Researchers detect the map file and begin mirroring the content to private repositories.
- April 1, 2026 (02:00 UTC): A threat actor publishes the first "unlocked" version of the leaked code on GitHub, claiming to have removed usage limits and subscription checks BleepingComputer.
- April 1-3, 2026: Viral threads drive traffic to these mirrors. One specific repository gained over 84,000 stars and 82,000 forks in less than 48 hours Zscaler.
This surge in traffic confirms the thesis that the competitive value of AI tools has created a blind spot in developer security. Despite the obvious risks of downloading a "cracked" version of a tool that requires full terminal access, tens of thousands of technical users bypassed their internal warnings. They were not just looking for a free tool; they were looking for an "unlocked" edge in an increasingly automated workforce. This behavior suggests that the fear of being left behind in the AI race is now a stronger motivator than the fear of system compromise.
The Vidar Vector: How 'Unlocked' Code Steals Credentials
The primary payload identified in the "unlocked" mirrors was Vidar, a commodity information-stealing malware designed to harvest sensitive browser data. Vidar is a well-known threat in the cybersecurity community, often distributed through cracked software and malicious advertisements Krebs on Security. In the context of this leak, it was specifically tuned to target the environment variables and SSH keys common on developer workstations BleepingComputer.
A second component found in these rogue repositories was GhostSocks. This is a proxying tool utilized by threat actors to tunnel network traffic through compromised workstations, effectively turning them into exit nodes. By installing a "cracked" version of Claude Code, developers were allowing their machines to become part of a global botnet. This is the ultimate irony of the agent era: in an attempt to automate their work, developers provided the tools for threat actors to automate their own exploitation.
The success of this social engineering campaign relied entirely on the "authenticity" of the leaked source. Because the malware was wrapped in 500,000 lines of genuine Anthropic code, it was able to pass casual inspection. The desire for "enterprise features for free" acted as the psychological lubricant for the infection TechRadar. It proves that even highly technical users are susceptible to the most basic lures when the bait is a state-of-the-art AI orchestrator.
The Case for a Minor Incident: Anthropic’s Defense
In the immediate aftermath, Anthropic moved into damage control, seeking to minimize the severity of the event. The company's official stance distinguished between intellectual property and actual user data. An Anthropic spokesperson maintained that this was a "packaging error" rather than a security breach, emphasizing that no model weights or training data were exposed TechRadar.
Defenders of the company argue that because the core "intelligence" of Claude remains on Anthropic's servers, the leak of the client-side orchestrator is a minor blow. They point out that anyone could eventually reverse-engineer the API calls that Claude Code makes, so the leak only accelerated the inevitable. Furthermore, supporters suggest that the leak might even benefit the ecosystem by showing how to build more robust agentic tools The Register. From this perspective, the "open-sourcing" was a public service disguised as a mistake.
However, this argument relies on a legacy definition of security. While technically correct that data privacy was maintained, the "packaging error" provided the requisite credibility for a massive supply-chain attack. In the age of AI agents, the orchestrator logic is the security boundary; exposing it is a breach of the trust developers place in the tool's integrity. When a company provides an agent that lives in the developer's terminal, the integrity of that package is the only thing standing between the user and total system compromise. By leaking the authentic source, Anthropic provided the perfect cover for malware authors to hide their payloads inside a "real" product.
The Shadow of Previous Failures: Patterns of Vulnerability
The Claude Code incident does not exist in a vacuum. It follows a pattern of vulnerabilities that have plagued the AI sector in early 2026. This includes the "ShadowPrompt" Chrome extension zero-day from late March, which allowed for zero-click data exfiltration from AI chat interfaces TechRadar. Researchers also pointed to the "Cloudy Day" series of vulnerabilities discovered by Oasis Security earlier that month Oasis Security.
| Metric | Detail |
|---|---|
| Lines of Code Leaked | 513,000+ |
| Files Exposed | 1,906 |
| Source Map Size | 59.8 MB |
| GitHub Mirror Reach | 84,000+ stars |
| Malware Payloads | Vidar v18.7, GhostSocks |
Furthermore, the malware strategy used here—leveraging fake "unlocked" AI tools—was previously seen in the "OpenClaw" campaign. In that instance, rogue copies of AI tools were used to distribute GhostSocks infostealers to unsuspecting researchers The Register. The difference with the Claude Code leak was the scale and the legitimacy of the underlying source code. Even with aggressive DMCA takedowns, over 8,000 rogue copies remain in various states of availability on decentralized platforms and private forums Ars Technica.
The sheer volume of these incidents suggests a systemic failure in how AI companies handle their software supply chains. The pressure to release features faster than competitors has led to a "ship first, secure later" mentality. This is a dangerous trend for an industry that claims to be building the future of human-AI collaboration. If the companies building the most advanced safety systems cannot secure their own build pipelines, the promise of "safe AI" becomes a hollow marketing slogan.
The Irony of Orchestration: High on One's Own Supply
There is a documented irony in Anthropic’s failure. The company is a leading proponent of using AI to accelerate software development, yet the speed of their own deployment pipeline outpaced their human-led safety checks. This incident highlights the "AI Safety Paradox": a company can spend millions of dollars training a model to be ethically sound, but that model's safety is irrelevant if the humans deploying it forget to delete a .map file. It is a reminder that the most sophisticated AI systems are still anchored to human error.
The leak revealed that the most valuable IP in the agent era isn't just the model—it's the logic that connects the model to the world. The 1,906 exposed files detailed how Claude handles errors and how it "decides" when a task is complete. This is the orchestrator, and it is the layer where the most significant innovations are currently occurring. By exposing this, Anthropic has effectively open-sourced its secret sauce to both competitors and threat actors alike.
The orchestrator logic is essentially the "personality" of the agent. It dictates how helpful, aggressive, or cautious the agent will be when interacting with a user's system. By leaking this, Anthropic has allowed others to clone their specific brand of agentic behavior without having to do the hard work of prompt engineering. This could lead to a wave of "Anthropic-flavored" agents that lack the company's official safety guardrails, further complicating the security landscape Zscaler.
Verdict: The Canary in the AI Coal Mine
The evidence presented in the aftermath of the Claude Code leak supports the thesis that the AI gold rush has compromised the security baseline of the developer community. The correlation between the leak and the 84,000-star surge in malicious mirrors proves that the perceived value of early access to AI agents is high enough to make even security-conscious developers ignore the risks of infostealer malware like Vidar. The lure of "unlocking" a state-of-the-art tool is a more powerful social engineering tool than any traditional phishing email.
This incident is the canary in the coal mine for the agentic era. It demonstrates that as long as AI tools provide a perceived competitive advantage, they will remain the most efficient social engineering lures available to threat actors. Anthropic's "packaging error" was not just a technical mistake; it was a revelation of the fragility of the entire AI supply chain. Human error at the deployment stage remains the most efficient way to "jailbreak" an AI company's security posture.
As we move deeper into an era of autonomous agents, the industry must acknowledge that the orchestrator is the new security boundary. The clinical post-mortem of version 2.1.88 suggests that while the AI might be getting smarter, the humans are still making the same 60MB mistakes. The industry's obsession with model weights has blinded it to the more mundane, but equally dangerous, vulnerabilities in the code that wraps them. Until supply chain security is taken as seriously as model alignment, the AI gold rush will continue to be a gold mine for malware authors.
LANGUAGE: en PRESET: incident-report