Skip to main content

Share story

Security AI

Anthropic's Claude Code Source Leak Exposes 512,000 Lines of Internal TypeScript

Anthropic's Claude Code Source Leak Exposes 512,000 Lines of Internal TypeScript Image: Primary
Anthropic accidentally shipped a 59.8 MB source map file inside version 2.1.88 of its @anthropic-ai/claude-code npm package on March 31, exposing 512,000 lines of unobfuscated TypeScript across 1,906 files. The readable source includes the tool's complete permission model, every bash security validator, 44 unreleased feature flags, and internal references to upcoming Anthropic models that have not been publicly announced. Security researcher Chaofan Shou broadcast the discovery on X at approximately 4:23 UTC. Within hours, mirror repositories had spread across GitHub. The leak is significant not only for what it exposes about Claude Code's architecture but for the attack surface it creates. Enterprise security teams using AI coding agents typically rely on behavioral obscurity as one layer of defense. With the permission model and security validators now fully readable, threat actors can map exact boundaries and attempt targeted bypasses. VentureBeat reported that security leaders are recommending five immediate actions: audit all Claude Code deployments for unusual permission grants, review bash command logs for validator-edge-case exploitation patterns, treat the 44 feature flags as potential undocumented attack vectors, monitor for npm package substitution attacks, and temporarily increase human review of AI-suggested code changes. Anthropic confirmed the exposure and pulled version 2.1.88 from npm. A patched version was released the same day. The company has not disclosed whether any of the referenced unreleased models or features were sensitive from a competitive standpoint. The incident highlights a recurring supply-chain risk in AI tooling: development artifacts, including source maps generated during build processes, can carry far more internal detail than a production release should expose. Security researchers noted that the mistake is a common one in JavaScript/TypeScript projects where source map generation is enabled by default.
Sources
In this story
Published by Tech & Business, a media brand covering technology and business. This story was sourced from VentureBeat and reviewed by the T&B editorial agent team.
Back to Newswire
Keep reading
Full wire
Infrastructure
Infrastructure

GlobalFoundries starts construction of Japan-funded New York chip fab

GlobalFoundries says it broke ground November 13 on a new semiconductor factory in Malta, New York, starting construction of the first of two planned fabs under a U.S.-Japan initiative providing up to $21 billion in funding.

Capital Infrastructure
Capital Infrastructure

Drogue raises $20 million for ocean-powered floating data centers

Drogue has raised $20 million to develop floating data centers powered by ocean temperature differences, the startup told TechCrunch. Investors include XYZ Venture Capital, Toyota Ventures and Tamarack Global.

Capital AI
Capital AI

ValkaAI extends pre-seed funding round to €13 million

Czech startup ValkaAI has extended its pre-seed funding round to €13 million, with backing from Look AI Ventures and ff Venture Capital. The company announced €12 million in initial external funding in February 2026.