Anthropic Claude Code Leak
嗯,用户让我总结一下这篇文章的内容,控制在100个字以内,而且不需要用“文章内容总结”这样的开头。好的,我先看看这篇文章讲的是什么。 文章主要讲的是Anthropic公司不小心泄露了Claude Code的源代码。这个代码是他们的人工智能编码代理,结果被一个安全研究员发现了,然后公开了。结果代码被下载了很多次,甚至被镜像到GitHub上,导致很多开发者和威胁分子都在分析和分发这个代码。 接着,文章还提到Zscaler ThreatLabz团队发现有人利用这个泄露事件作为诱饵,传播恶意软件Vidar和GhostSocks。他们通过GitHub上的恶意仓库来分发这些恶意软件。 最后,文章给出了几点建议,比如实施零信任架构、不要从不可信的GitHub仓库下载代码、教育开发者泄露的代码不是开源的等等。 好的,现在我要把这些信息浓缩到100字以内。重点包括:泄露事件、影响、恶意软件传播以及安全建议。 可能的结构是: Anthropic泄露Claude Code源代码导致大规模传播和滥用;Zscaler发现利用此事件传播恶意软件;建议实施零信任架构和避免使用不可信代码。 再检查一下字数是否在限制内。嗯,差不多了。 </think> Anthropic意外泄露Claude Code源代码引发大规模传播与滥用;Zscaler发现利用此事件传播恶意软件Vidar和GhostSocks;建议实施零信任架构并避免使用不可信代码。 2026-4-1 20:45:48 Author: securityboulevard.com(查看原文) 阅读量:9 收藏

IntroductionOn March 31, 2026, Anthropic accidentally exposed the full source code of Claude Code (its flagship terminal-based AI coding agent) through a 59.8 MB JavaScript source map (.map) file bundled in the public npm package @anthropic-ai/claude-code version 2.1.88. A security researcher, Chaofan Shou (@Fried_rice), publicly disclosed Anthropic’s leak on X which triggered an immediate viral response. The leaked file contained approximately 513,000 lines of unobfuscated TypeScript across 1,906 files, revealing the complete client-side agent harness, according to online publications. Within hours, the codebase was downloaded from Anthropic’s own Cloudflare R2 bucket, mirrored to GitHub, and forked tens of thousands of times. Thousands of developers, researchers, and threat actors are actively analyzing, forking, porting to Rust/Python and redistributing it. Some of the GitHub repositories have gained over 84,000 stars and 82,000 forks. Anthropic has issued Digital Millennium Copyright Act (DMCA) notices on some mirrors, but the code is now available across hundreds of public repositories.In addition to discussing the Anthropic leak, this blog post also covers a “Claude Code leak” lure delivering Vidar and Ghostsocks malware that was discovered and analyzed by the Zscaler ThreatLabz team.RecommendationsImplement Zero Trust architecture and prioritize segmenting mission critical application access. Do not download, fork, build, or run code from any GitHub repository claiming to be the “leaked Claude Code.” Verify every source against Anthropic’s official channels only.Educate developers that leaked code is not “open source”. It remains proprietary and dangerous to run unmodified.Avoid running AI agents with local shell/tool access on untrusted codebases.Monitor for anomalous telemetry or outbound connections from developer workstations.Use official channels and signed binaries only.Scan local environments and Git clones for suspicious processes, modified hooks, or unexpected npm packages, and wait for a cool down period before using the latest npm packages.Watch for Anthropic patches addressing newly exposed paths.BackgroundClaude Code is Anthropic’s official AI-powered coding CLI/agent that delegates tasks directly in the terminal, using hooks, background agents, autonomous daemons, and local execution capabilities. The leak stemmed from a packaging error where Bun (the runtime used) generated a full source map by default, and *.map was not excluded in .npmignore or the files field of package.json. The map file referenced a complete ZIP of the original TypeScript sources hosted on Anthropic’s infrastructure.Components ExposedAgent orchestration: LLM API calls, streaming, tool-call loops, retry logic, thinking/review modes, multi-agent coordination.Permission and execution layer: Claude Code hooks (auto-executing shell commands/scripts), Model Context Protocol (MCP) integrations, environment variable handling, project-load flows.Memory and state: Persistent memory systems, background agents/autonomous daemons.Security-related internals: Telemetry analysis, encryption tools, inter-process communication (IPC), OAuth flows, permission logic.Hidden/restricted features: 44 feature flags (20+ unshipped), internal API design, system prompts.Build and dependency details: Exact npm handling, local execution paths.Not exposed: Model weights, safety pipelines, or user data.Potential Misuse and Security RisksThe heavy sharing on GitHub (thousands of forks, stars, and mirrors by developers worldwide) turns this into a vector for abuse. Key risks include:Supply chain attacks via malicious forks and mirrors: Thousands of repositories now host the leaked code or derivatives. Threat actors can (and already are) seeding trojanized versions with backdoors, data exfiltrators, or cryptominers. Unsuspecting users cloning “official-looking” forks risks immediate compromise.Amplified exploitation of known vulnerabilities and discovery of new vulnerabilities: Pre-existing flaws (e.g., CVE-2025-59536, CVE-2026-21852, RCE and API key exfiltration via malicious repo configs, hooks, MCP servers, and env vars) are now far easier to weaponize. Threat actors with full source visibility can craft precise malicious repositories or project files that trigger arbitrary shell execution or credential theft simply by cloning/opening an untrusted repo. The exposed hook and permission logic makes silent device takeover more reliable.Local environment and developer workstation compromise: Users building or running the leaked code locally introduce unvetted dependencies and execution paths. The leak coincided exactly with a separate malicious Axios npm supply chain attack (RATs published March 31, 00:21–03:29 UTC), creating a perfect storm for anyone updating Claude Code via npm that day.ThreatLabz discovers “Claude Code leak” lure that distributes Vidar and GhostSocksWhile monitoring GitHub for threats, ThreatLabz came across a “Claude Code leak” repository published by idbzoomh (links located in the IOC section). The repository looks like it’s trying to pass itself off as leaked TypeScript source code for Anthropic’s Claude Code CLI. The README file even claims the code was exposed through a .map file in the npm package and then rebuilt into a working fork with “unlocked” enterprise features and no message limits. The repository link appears near the top of Google results for searches like “leaked Claude Code,” which makes it easy for curious users to encounter, as shown in the figure below.Figure 1: Google search results for leaked Claude Code on GitHub returning a malicious repository.Figure 2: Malicious GitHub repository using the leaked Claude Code source as a lure.The malicious ZIP archive in the repository’s releases section is named Claude Code – Leaked Source Code (.7z). The archive includes ClaudeCode_x64.exe, a Rust-based dropper. On execution, the ClaudeCode_x64.exe drops Vidar v18.7 and GhostSocks. Vidar is an information stealer and GhostSocks is used to proxy network traffic. In early March, another security vendor reported a similar campaign where GitHub was being used to deliver the same payload.The threat actor keeps updating the malicious ZIP archive in short intervals. At the time of analysis, ThreatLabz observed that there were two ZIP archives updated in the releases section in a short timeframe. The figure below shows the first ZIP archive ThreatLabz encountered which was updated about 13 hours ago.Figure 3: GitHub repository using the Claude Code leak as a lure to distribute malicious ZIP archives.ThreatLabz also identified the same GitHub repository hosted under another account (located in the IOC section) that contains identical code and appears to be committed by the same threat actor, idbzoomh.Unlike the earlier repository, this one does not include a releases section. The README file displays a prominent “Download ZIP” button. However, it does not link to any compiled binary or an archive and was non-functional at the time of analysis. The figure below shows the repository and non-functional button.Figure 4: Additional GitHub repository hosting the same Claude Code leak lure with a “Download ZIP” button.ConclusionThreat actors are actively leveraging the recent Claude Code leak as a social engineering lure to distribute malicious payloads with GitHub serving as a delivery channel. Threat actors move quickly to take advantage of a publicized incident. That kind of rapid movement increases the chance of opportunistic compromise, especially through trojanized repositories.Organizations must prioritize the implementation of Zero Trust architecture to minimize the impact from a shadow AI instance of a trojanized Claude agent, as well as potential vulnerability exploit attempts against legitimate Claude agents stemming from this code leak.Zscaler CoverageZscaler has ensured coverage for the threats associated with the trojanized version of the Claude source code repository, ensuring detection with the following threat names. Advanced Threat ProtectionWin64.Downloader.TradeDownloaderWin32.PWS.VidarWin32.Trojan.GHOSTSOCKSIndicators Of Compromise (IOCs)HashDescriptiond8256fbc62e85dae85eb8d4b49613774Initial archive file8660646bbc6bb7dc8f59a764e25fe1fdInitial archive file77c73bd5e7625b7f691bc00a1b561a0fDropper EXE file for payload81fb210ba148fd39e999ee9cdc085dfcDropper EXE file for payload9a6ea91491ccb1068b0592402029527fVidar v18.73388b415610f4ae018d124ea4dc99189GhostSockshttps://steamcommunity[.]com/profiles/76561198721263282Vidar C2https://telegram[.]me/g1n3sssVidar C2https://147.45.197[.]92:443GhostSocks C2https://94.228.161[.]88:443GhostSocks C2https://github[.]com/leaked-claude-code/leaked-claude-codeTrojanized Claude Code source leakhttps://github[.]com/my3jie/leaked-claude-codeTrojanized Claude Code source leakhttps://github[.]com/idbzoomh1Trojanized repository publisher

*** This is a Security Bloggers Network syndicated blog from Security Research | Blog authored by Manisha Ramcharan Prajapati (Sr. Security Researcher). Read the original post at: https://www.zscaler.com/blogs/security-research/anthropic-claude-code-leak


文章来源: https://securityboulevard.com/2026/04/anthropic-claude-code-leak/
如有侵权请联系:admin#unsafe.sh