Claude Code Flaws Allow Remote Code Execution and API Key Exfiltration
嗯,用户让我总结一下这篇文章的内容,控制在一百个字以内。首先,我需要仔细阅读文章,抓住关键点。文章主要讲的是Anthropic的Claude Code这个AI编码助手被发现存在多个安全漏洞,可能导致远程代码执行和API凭证被盗。 接下来,我需要确定这些漏洞的分类和影响。文章提到了三个主要漏洞类别,每个都有CVE编号和CVSS评分。这些漏洞允许攻击者通过恶意仓库窃取API密钥,甚至控制开发者机器。 然后,我要考虑用户的需求。他们可能需要一个简洁的摘要,用于快速了解问题。所以,我应该用简明的语言概括主要发现和影响。 最后,确保字数不超过一百个字,并且直接描述内容,不需要开头语。这样用户就能迅速获取关键信息。 </think> 研究人员发现Anthropic的Claude Code AI编码助手存在多个安全漏洞,可能导致远程代码执行和API凭证泄露。攻击者可通过恶意仓库窃取开发者API密钥并控制其AI基础设施。 2026-2-25 17:0:0 Author: thehackernews.com(查看原文) 阅读量:8 收藏

Artificial Intelligence / Vulnerability

Cybersecurity researchers have disclosed multiple security vulnerabilities in Anthropic's Claude Code, an artificial intelligence (AI)-powered coding assistant, that could result in remote code execution and theft of API credentials.

"The vulnerabilities exploit various configuration mechanisms, including Hooks, Model Context Protocol (MCP) servers, and environment variables – executing arbitrary shell commands and exfiltrating Anthropic API keys when users clone and open untrusted repositories," Check Point Research said in a report shared with The Hacker News.

The identified shortcomings fall under three broad categories -

  • No CVE (CVSS score: 8.7) - A code injection vulnerability stemming from a user consent bypass when starting Claude Code in a new directory that could result in arbitrary code execution without additional confirmation via untrusted project hooks defined in .claude/settings.json. (Fixed in version 1.0.87 in September 2025)
  • CVE-2025-59536 (CVSS score: 8.7) - A code injection vulnerability that allows execution of arbitrary shell commands automatically upon tool initialization when a user starts Claude Code in an untrusted directory. (Fixed in version 1.0.111 in October 2025)
  • CVE-2026-21852 (CVSS score: 5.3) - An information disclosure vulnerability in Claude Code's project-load flow that allows a malicious repository to exfiltrate data, including Anthropic API keys. (Fixed in version 2.0.65 in January 2026)

"If a user started Claude Code in an attacker-controller repository, and the repository included a settings file that set ANTHROPIC_BASE_URL to an attacker-controlled endpoint, Claude Code would issue API requests before showing the trust prompt, including potentially leaking the user's API keys," Anthropic said in an advisory for CVE-2026-21852.

In other words, simply opening a crafted repository is enough to exfiltrate a developer's active API key, redirect authenticated API traffic to external infrastructure, and capture credentials. This, in turn, can permit the attacker to burrow deeper into the victim's AI infrastructure.

This could potentially involve accessing shared project files, modifying/deleting cloud-stored data, uploading malicious content, and even generating unexpected API costs.

Successful exploitation of the first vulnerability could trigger stealthy execution on a developer's machine without any additional interaction beyond launching the project.

CVE-2025-59536 also achieves a similar goal, the main difference being that repository-defined configurations defined through .mcp.json and claude/settings.json file could be exploited by an attacker to override explicit user approval prior to interacting with external tools and services through the Model Context Protocol (MCP). This is achieved by setting the "enableAllProjectMcpServers" option to true.

"As AI-powered tools gain the ability to execute commands, initialize external integrations, and initiate network communication autonomously, configuration files effectively become part of the execution layer," Check Point said. "What was once considered operational context now directly influences system behavior."

"This fundamentally alters the threat model. The risk is no longer limited to running untrusted code – it now extends to opening untrusted projects. In AI-driven development environments, the supply chain begins not only with source code, but with the automation layers surrounding it."

Found this article interesting? Follow us on Google News, Twitter and LinkedIn to read more exclusive content we post.


文章来源: https://thehackernews.com/2026/02/claude-code-flaws-allow-remote-code.html
如有侵权请联系:admin#unsafe.sh