Claude Code Leak: How a Source Map Exposed Anthropic’s AI Security Flaw (2026)
The unauthorized release of Claude Code’s source code has ignited a global debate on AI ethics, with a Chinese teenager at the center of the storm. The leak, traced to a debugging file, revealed systemic issues in Anthropic’s security practices and spurred unprecedented community scrutiny.

Claude Code Leak: How a Source Map Exposed Anthropic’s AI Security Flaw (2026)
summarize3-Point Summary
- 1The unauthorized release of Claude Code’s source code has ignited a global debate on AI ethics, with a Chinese teenager at the center of the storm. The leak, traced to a debugging file, revealed systemic issues in Anthropic’s security practices and spurred unprecedented community scrutiny.
- 2Claude Code Leak: How a Source Map Exposed Anthropic’s AI Security Flaw (2026) The unauthorized exposure of Anthropic’s Claude Code source code in March 2026 triggered a global reckoning on AI ethics, security, and corporate accountability.
- 3A 59.8 MB JavaScript source map (.map) file, accidentally published in version 2.1.88 of the @anthropic-ai/claude-code npm package, revealed internal debugging structures, function names, and API endpoints—exposing critical vulnerabilities in Anthropic’s code handling practices.
psychology_altWhy It Matters
- check_circleThis update has direct impact on the Etik, Güvenlik ve Regülasyon topic cluster.
- check_circleThis topic remains relevant for short-term AI monitoring.
- check_circleEstimated reading time is 3 minutes for a quick decision-ready brief.
Claude Code Leak: How a Source Map Exposed Anthropic’s AI Security Flaw (2026)
The unauthorized exposure of Anthropic’s Claude Code source code in March 2026 triggered a global reckoning on AI ethics, security, and corporate accountability. A 59.8 MB JavaScript source map (.map) file, accidentally published in version 2.1.88 of the @anthropic-ai/claude-code npm package, revealed internal debugging structures, function names, and API endpoints—exposing critical vulnerabilities in Anthropic’s code handling practices.
How the Source Map Leak Occurred
JavaScript source maps are designed to map minified code back to its original source for debugging. However, Anthropic mistakenly included a source map file in a public npm release, granting unauthorized access to proprietary logic. Researchers later confirmed the file contained comments referencing user behavior analytics and unattributed open-source code fragments. The leak was first detected on March 31, 2026, via automated npm registry scans.
The Role of the GitHub Researcher Behind the Discovery
A GitHub user known as @Fried_rice, later identified as a 19-year-old developer from Hangzhou, China, documented the leak in a detailed public analysis titled "Claude Code Is Not Your Friend." His findings, published on March 31, 2026, revealed 17 instances where user-submitted code patterns were replicated in Claude Code’s responses—directly contradicting Anthropic’s privacy claims. The post garnered over 12,000 GitHub stars within 48 hours and prompted independent audits by the open-source community.
Anthropic’s Response and Patch Timeline
On April 1, 2026, Anthropic acknowledged the "unintended exposure" and removed the affected package from npm. In a public statement, the company pledged to implement mandatory source map obfuscation, audit all future releases, and revise its data usage policy. As of April 2, 2026, the updated @anthropic-ai/claude-code v2.1.89 has been released with source maps stripped from public builds.
Industry Impact: New Standards for AI Transparency
The leak catalyzed the formation of "CodeNotCaptive," a coalition of AI developers demanding transparent data usage policies. Major tech firms paused Claude Code integrations, and universities revoked licensing agreements. Open-source projects like VS Code and GitHub Copilot have since adopted new guidelines requiring source map validation before public release.
Why This Matters for AI Governance
This incident underscores a broader truth: AI transparency cannot rely on corporate goodwill. A single developer’s technical diligence exposed systemic gaps in AI security, proving that open-source scrutiny is essential to ethical AI development. As AI models grow more embedded in daily workflows, source code integrity and user consent must become non-negotiable standards.

