{"id":453,"date":"2026-04-01T07:28:20","date_gmt":"2026-04-01T07:28:20","guid":{"rendered":"https:\/\/thedigitalfortress.us\/?p=453"},"modified":"2026-04-01T07:28:20","modified_gmt":"2026-04-01T07:28:20","slug":"claude-code-source-leaked-via-npm-packaging-error-anthropic-confirms","status":"publish","type":"post","link":"https:\/\/thedigitalfortress.us\/?p=453","title":{"rendered":"Claude Code Source Leaked via npm Packaging Error, Anthropic Confirms"},"content":{"rendered":"<div>\n<p><span class=\"p-author\"><i class=\"icon-font icon-user\">\ue804<\/i><span class=\"author\">Ravie Lakshmanan<\/span><i class=\"icon-font icon-calendar\">\ue802<\/i><span class=\"author\">Apr 01, 2026<\/span><\/span><span class=\"p-tags\">Data Breach \/ Artificial Intelligence<\/span><\/p>\n<\/div>\n<div id=\"articlebody\">\n<div class=\"separator\" style=\"clear: both;\"><a href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEj39e4BXzk1M6BK7XEJcfogVbdwnYJjie08kNTAeW5T46Tn8UvbbaYGrrEpgw1Pa4IpJYeGe8AR7T_UCp4_vWYTcG-c5DY0HNlHW-8SbYkscVvjAKjKR3gHmlWAQONEx8kg_ANVfOr8OsQ7uTm-XWHW1PNfusxBj-Tn2kn-V2EedPykA3ESB66doPXxGzT8\/s1700-e365\/claude-code.jpg\" style=\"display: block;  text-align: center; clear: left; float: left;\"><\/a><\/div>\n<p>Anthropic on Tuesday confirmed that internal code for its popular artificial intelligence (AI) coding assistant, Claude Code, had been inadvertently released due to a human error.<\/p>\n<p>\u00abNo sensitive customer data or credentials were involved or exposed,\u00bb an Anthropic spokesperson <a href=\"https:\/\/www.cnbc.com\/2026\/03\/31\/anthropic-leak-claude-code-internal-source.html\" rel=\"noopener\" target=\"_blank\">said<\/a> in a statement shared with CNBC News. \u00abThis was a release packaging issue caused by human error, not a security breach. We\u2019re rolling out measures to prevent this from happening again.\u00bb<\/p>\n<p>The discovery came after the AI upstart released <a href=\"https:\/\/www.npmjs.com\/package\/@anthropic-ai\/claude-code?activeTab=versions\" rel=\"noopener\" target=\"_blank\">version 2.1.88<\/a> of the Claude Code npm package, with users spotting that it contained a source map file that could be used to access Claude Code&#8217;s source code \u2013 comprising nearly 2,000 TypeScript files and more than 512,000 lines of code. The version is no longer available for download from npm.<\/p>\n<p>Security researcher Chaofan Shou was the first to <a href=\"https:\/\/x.com\/Fried_rice\/status\/2038894956459290963\" rel=\"noopener\" target=\"_blank\">publicly flag<\/a> it on X, stating \u00abClaude code source code has been leaked via a map file in their npm registry!\u00bb The X post has since amassed more than 28.8 million views. The leaked codebase remains accessible via a <a href=\"https:\/\/github.com\/instructkr\/claw-code\">public GitHub repository<\/a>, where it has surpassed 84,000 stars and 82,000 forks.<\/p>\n<div class=\"dog_two clear\">\n<div class=\"cf\"><a href=\"https:\/\/thehackernews.uk\/vpn-risk-report-inside-d\" rel=\"nofollow noopener sponsored\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"lazyload\" alt=\"Cybersecurity\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEgWajeG0cdaapf1GKTZRUZUB7BzuYGegyw5k0eAorJXlmkFdYCCeLXXhXYJuXU9lWD33rV6rRnIyly3czoNfYifpxk1eGA5slItPmim3HkubXoQMgC4J7hdQPywxGbWq7Eqeff_o6s2Fq-WmSFd5guwdLn7IqpveMqULqtVnd-ndnljWYGj45EkMFB7m0qm\/s728-e100\/z-d.jpg\" width=\"729\" height=\"91\"\/><\/a><\/div>\n<\/div>\n<p>A source code leak of this kind is significant, as it gives software developers and Anthropic&#8217;s competitors a blueprint for how the popular coding tool works. Users who have <a href=\"https:\/\/www.reddit.com\/r\/ClaudeAI\/comments\/1s8lkkm\/i_dug_through_claude_codes_leaked_source_and\/\" rel=\"noopener\" target=\"_blank\">dug into the code<\/a> have published details of its <a href=\"https:\/\/x.com\/himanshustwts\/status\/2038924027411222533\" rel=\"noopener\" target=\"_blank\">self-healing memory architecture<\/a> to overcome the model&#8217;s <a href=\"https:\/\/x.com\/troyhua\/status\/2039052328070734102\" rel=\"noopener\" target=\"_blank\">fixed context window constraints<\/a>, as well as other internal components.<\/p>\n<p><a name=\"more\"\/><\/p>\n<p>These <a href=\"https:\/\/dev.to\/gabrielanhaia\/claude-codes-entire-source-code-was-just-leaked-via-npm-source-maps-heres-whats-inside-cjo\" rel=\"noopener\" target=\"_blank\">include<\/a> a tools system to facilitate various capabilities like file read or bash execution, a query engine to handle LLM API calls and orchestration, multi-agent orchestration to spawn \u00absub-agents\u00bb or swarms to carry out complex tasks, and a bidirectional communication layer that connects IDE extensions to Claude Code CLI.<\/p>\n<p>The leak has also shed light on a feature called <a href=\"https:\/\/x.com\/itsolelehmann\/status\/2039018963611627545\" rel=\"noopener\" target=\"_blank\">KAIROS<\/a> that allows Claude Code to operate as a persistent, background agent that can periodically fix errors or run tasks on its own without waiting for human input, and even send push notifications to users. Complementing this proactive mode is a <a href=\"https:\/\/x.com\/AlexFinn\/status\/2039005703160172723\" rel=\"noopener\" target=\"_blank\">new \u00abdream\u00bb mode<\/a> that will allow Claude to constantly think in the background to develop ideas and iterate existing ones.<\/p>\n<div class=\"separator\" style=\"clear: both;\"><a href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEh-8BU5HpgGZ9cTYZqswMdEoMZgwYK7Py1unMSuXMJwaifmm5N1_1RhUB0P_CKOMnvaProx0uD3_6TZPVbtzVmBtxBsWOjqko6CLw9bnX2MjpHekHUraaKsxxWOgws8A0WUsGP8fmhPTSyQFI-q6Eq6n2nd3wFrTGMLjgrC5sV9iiYskYK8qk8JlyuzlH3z\/s1700-e365\/code.jpg\" style=\"display: block;  text-align: center; clear: left; float: left;\"><img decoding=\"async\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEh-8BU5HpgGZ9cTYZqswMdEoMZgwYK7Py1unMSuXMJwaifmm5N1_1RhUB0P_CKOMnvaProx0uD3_6TZPVbtzVmBtxBsWOjqko6CLw9bnX2MjpHekHUraaKsxxWOgws8A0WUsGP8fmhPTSyQFI-q6Eq6n2nd3wFrTGMLjgrC5sV9iiYskYK8qk8JlyuzlH3z\/s1700-e365\/code.jpg\" alt=\"\" border=\"0\" data-original-height=\"712\" data-original-width=\"900\"\/><\/a><\/div>\n<p>Perhaps the most intriguing detail is the tool&#8217;s Undercover Mode for making \u00abstealth\u00bb contributions to open-source repositories. \u00abYou are operating UNDERCOVER in a PUBLIC\/OPEN-SOURCE repository. Your commit messages, PR titles, and PR bodies MUST NOT contain ANY Anthropic-internal information. Do not blow your cover,\u00bb reads the system prompt.\u00a0<\/p>\n<p>Another fascinating finding involves Anthropic&#8217;s attempts to covertly fight model distillation attacks. The system has <a href=\"https:\/\/x.com\/nyk_builderz\/status\/2039004963943133589\" rel=\"noopener\" target=\"_blank\">controls in place<\/a> that inject fake tool definitions into API requests to poison training data if competitors attempt to scrape Claude Code&#8217;s outputs.<\/p>\n<h3>Typosquat npm Packages Pushed to Registry<\/h3>\n<p>With Claude Code&#8217;s internals now laid bare, the development risks provide bad actors with ammunition to bypass guardrails and trick the system into performing unintended actions, such as running malicious commands or exfiltrating data.<\/p>\n<p>\u00abInstead of brute-forcing jailbreaks and prompt injections, attackers can now study and fuzz exactly how data flows through Claude Code&#8217;s four-stage context management pipeline and craft payloads designed to survive compaction, effectively persisting a backdoor across an arbitrarily long session,\u00bb AI security company Straiker <a href=\"https:\/\/www.straiker.ai\/blog\/claude-code-source-leak-with-great-agency-comes-great-responsibility\" rel=\"noopener\" target=\"_blank\">said<\/a>.<\/p>\n<p>The more pressing concern is the fallout from the Axios supply chain attack, as users who installed or updated Claude Code via npm on March 31, 2026, between 00:21 and 03:29 UTC may have pulled with it a trojanized version of the HTTP client that contains a cross-platform remote access trojan. Users are advised to immediately downgrade to a safe version and rotate all secrets.<\/p>\n<div class=\"dog_two clear\">\n<div class=\"cf\"><a href=\"https:\/\/thehackernews.uk\/fast-response-not-fast-d\" rel=\"nofollow noopener sponsored\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"lazyload\" alt=\"Cybersecurity\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjgi9mu68zRUz1nCLLKmkAA2aBtNfP_JOTXulZoB6yImso1Onk7oM_LI0kdROu8fq5S5oDyMtd1j50W44Ye_8Sl3zQZiE8A9tmFr6kejGKjGh74uoxluF-RyBq_unDQlzjXZHCqQeuYXBoogda5zf0w-zXd6v0rIM7fEw6TcFf_QGWBu5Mop-djkEaOUa5A\/s728-e100\/tl-d.jpg\" width=\"729\" height=\"91\"\/><\/a><\/div>\n<\/div>\n<p>What&#8217;s more, attackers are already capitalizing on the leak to typosquat internal npm package names in an attempt to target those who may be trying to compile the leaked Claude Code source code and stage dependency confusion attacks. The names of the packages, all published by a user named \u00ab<a href=\"https:\/\/www.npmjs.com\/~pacifier136\" rel=\"noopener\" target=\"_blank\">pacifier136<\/a>,\u00bb are listed below &#8211;<\/p>\n<ul>\n<li>audio-capture-napi<\/li>\n<li>color-diff-napi<\/li>\n<li>image-processor-napi<\/li>\n<li>modifiers-napi<\/li>\n<li>url-handler-napi<\/li>\n<\/ul>\n<p>\u00abRight now they&#8217;re empty stubs (`module.exports = {}`), but that&#8217;s how these attacks work \u2013 squat the name, wait for downloads, then push a malicious update that hits everyone who installed it,\u00bb security researcher Cl\u00e9ment Dumas <a href=\"https:\/\/x.com\/Butanium_\/status\/2039079715823128964\" rel=\"noopener\" target=\"_blank\">said<\/a> in a post on X.<\/p>\n<p>The incident is the second major blunder for Anthropic within a week. Details about the company&#8217;s <a href=\"https:\/\/fortune.com\/2026\/03\/26\/anthropic-leaked-unreleased-model-exclusive-event-security-issues-cybersecurity-unsecured-data-store\/\" rel=\"noopener\" target=\"_blank\">upcoming AI model<\/a>, along with other internal data, were left accessible via the company&#8217;s content management system (CMS) last week. Anthropic subsequently acknowledged it&#8217;s been testing the model with early access customers, stating it&#8217;s \u00abmost capable we&#8217;ve built to date,\u00bb per <a href=\"https:\/\/fortune.com\/2026\/03\/26\/anthropic-says-testing-mythos-powerful-new-ai-model-after-data-leak-reveals-its-existence-step-change-in-capabilities\/\" rel=\"noopener\" target=\"_blank\">Fortune<\/a>.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\ue804Ravie Lakshmanan\ue802Apr 01, 2026Data Breach \/ Artificial Intelligence Anthropic on Tuesday confirmed that internal code for its popular artificial intelligence (AI) coding assistant, Claude Code, had been inadvertently released due&hellip;<\/p>\n","protected":false},"author":1,"featured_media":454,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[105,9,10,63,1003,1001,39,1002,1000],"class_list":["post-453","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-anthropic","tag-claude","tag-code","tag-confirms","tag-error","tag-leaked","tag-npm","tag-packaging","tag-source"],"_links":{"self":[{"href":"https:\/\/thedigitalfortress.us\/index.php?rest_route=\/wp\/v2\/posts\/453","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thedigitalfortress.us\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thedigitalfortress.us\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thedigitalfortress.us\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thedigitalfortress.us\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=453"}],"version-history":[{"count":0,"href":"https:\/\/thedigitalfortress.us\/index.php?rest_route=\/wp\/v2\/posts\/453\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/thedigitalfortress.us\/index.php?rest_route=\/wp\/v2\/media\/454"}],"wp:attachment":[{"href":"https:\/\/thedigitalfortress.us\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=453"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thedigitalfortress.us\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=453"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thedigitalfortress.us\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=453"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}