---
title: "Claude Code 打开 GitHub 仓库即执行隐藏恶意代码，攻击者可获完全控制"
canonical: "https://new.nat6.net/news/cmqz20a0a000dsly4gw09u9xt/"
date: "2026-06-29"
updated: "2026-11-05"
source: "The Decoder：AI News（RSS）"
source_url: "https://the-decoder.com/claude-code-runs-a-github-repos-hidden-malware-without-verification-giving-attackers-full-control"
language: "zh"
topics: []
license: "https://new.nat6.net/sources/"
attribution: "Content is based on curated titles and AI summaries from the AIHOT public API, with attribution and links back; original copyright remains with the original publishers and authors."
---

# Claude Code 打开 GitHub 仓库即执行隐藏恶意代码，攻击者可获完全控制

- 发布日期 / Published: 2026-06-29
- 更新时间 / Updated: 2026-11-05
- 分类 / Category: 论文与研究
- 来源 / Source: The Decoder：AI News（RSS） — [原文 / Original](https://the-decoder.com/claude-code-runs-a-github-repos-hidden-malware-without-verification-giving-attackers-full-control)
- AIHOT: [条目页 / Item](https://aihot.news/items/cmqz20a0a000dsly4gw09u9xt)
- 页面 / Page: https://new.nat6.net/news/cmqz20a0a000dsly4gw09u9xt/
- 结构化数据 / JSON: https://new.nat6.net/api/v1/articles/cmqz20a0a000dsly4gw09u9xt.json

- 语言 / Languages: [zh](https://new.nat6.net/news/cmqz20a0a000dsly4gw09u9xt/) · [en](https://new.nat6.net/en/news/cmqz20a0a000dsly4gw09u9xt/) · [de](https://new.nat6.net/de/news/cmqz20a0a000dsly4gw09u9xt/) · [fr](https://new.nat6.net/fr/news/cmqz20a0a000dsly4gw09u9xt/) · [ru](https://new.nat6.net/ru/news/cmqz20a0a000dsly4gw09u9xt/) · [ja](https://new.nat6.net/ja/news/cmqz20a0a000dsly4gw09u9xt/) · [es](https://new.nat6.net/es/news/cmqz20a0a000dsly4gw09u9xt/) · [ko](https://new.nat6.net/ko/news/cmqz20a0a000dsly4gw09u9xt/) · [vi](https://new.nat6.net/vi/news/cmqz20a0a000dsly4gw09u9xt/) · [th](https://new.nat6.net/th/news/cmqz20a0a000dsly4gw09u9xt/) · [id](https://new.nat6.net/id/news/cmqz20a0a000dsly4gw09u9xt/) · [ms](https://new.nat6.net/ms/news/cmqz20a0a000dsly4gw09u9xt/) · [fil](https://new.nat6.net/fil/news/cmqz20a0a000dsly4gw09u9xt/) · [hi](https://new.nat6.net/hi/news/cmqz20a0a000dsly4gw09u9xt/)

## AI 摘要 / AI summary

安全研究人员在 Mozilla 的 GenAI 漏洞赏金平台 0DIN 发现新攻击向量。一个看似正常的 GitHub 仓库包含 setup 脚本，该脚本运行时从 DNS 条目拉取命令并执行，恶意代码从未存在于仓库中，对扫描器、代码审查和 AI 智能体不可见。开发者使用 Claude Code 等 AI 编码工具打开该仓库时，Claude Code 在设置过程中遇到常规错误消息后自动运行该脚本，打开反向 shell，攻击者可窃取 API 密钥和登录凭据并维持持久访问。研究人员建议 AI 智能体应在运行前显示 setup 脚本内容，开发者应将第三方仓库的 setup 说明视为不受信任代码。

## 推荐理由 / Why it matters

用 AI 编码工具克隆仓库就能被反向 shell 控制，这个攻击向量比想象中简单。0DIN 的研究把整个链拆得很清楚，每条修复建议开发者现在就能用。

## 来源与版权 / Source & copyright

内容基于 AIHOT 公开 API 的精选标题与 AI 摘要，已注明来源并回链；原文版权归原媒体与作者所有。

原文版权归原媒体与作者所有；本站不镜像全文。/ Original copyright remains with the original publishers and authors; this site does not mirror full texts.

## 关于橙子中转站 / About Orange Relay

橙子中转站（pro.nat6.net）是一家优质的 AI API 中转站：价格优惠、质量稳定、模型齐全，支持 Claude、GPT、Gemini 等主流模型，欢迎体验。

[访问橙子中转站](https://pro.nat6.net/?utm_source=orange_news&utm_medium=article_footer&utm_campaign=brand&lang=zh)

## JSON-LD

```json
{
  "@context": "https://schema.org",
  "@type": "NewsArticle",
  "@id": "https://new.nat6.net/news/cmqz20a0a000dsly4gw09u9xt/#article",
  "mainEntityOfPage": {
    "@type": "WebPage",
    "@id": "https://new.nat6.net/news/cmqz20a0a000dsly4gw09u9xt/"
  },
  "url": "https://new.nat6.net/news/cmqz20a0a000dsly4gw09u9xt/",
  "headline": "Claude Code 打开 GitHub 仓库即执行隐藏恶意代码，攻击者可获完全控制",
  "description": "安全研究人员在 Mozilla 的 GenAI 漏洞赏金平台 0DIN 发现新攻击向量。一个看似正常的 GitHub 仓库包含 setup 脚本，该脚本运行时从 DNS 条目拉取命令并执行，恶意代码从未存在于仓库中，对扫描器、代码审查和 AI 智能体不可见。开发者使用 Claude Code 等 AI 编码工具打开该…",
  "articleSection": "论文与研究",
  "keywords": "AI, The Decoder：AI News（RSS）",
  "datePublished": "2026-06-29T10:04:32Z",
  "dateModified": "2026-11-05T20:56:44Z",
  "inLanguage": "zh-CN",
  "isAccessibleForFree": true,
  "author": {
    "@type": "Organization",
    "name": "橙子新闻编辑部",
    "url": "https://new.nat6.net/about/"
  },
  "publisher": {
    "@type": "NewsMediaOrganization",
    "@id": "https://new.nat6.net/#org",
    "name": "橙子新闻",
    "url": "https://new.nat6.net/",
    "logo": {
      "@type": "ImageObject",
      "url": "https://new.nat6.net/assets/img/logo-512.png",
      "width": 512,
      "height": 512
    }
  },
  "image": {
    "@type": "ImageObject",
    "url": "https://new.nat6.net/assets/img/og-default.png",
    "width": 1200,
    "height": 630
  },
  "isPartOf": {
    "@id": "https://new.nat6.net/#website"
  },
  "isBasedOn": "https://the-decoder.com/claude-code-runs-a-github-repos-hidden-malware-without-verification-giving-attackers-full-control",
  "citation": [
    "https://aihot.news/items/cmqz20a0a000dsly4gw09u9xt",
    "https://the-decoder.com/claude-code-runs-a-github-repos-hidden-malware-without-verification-giving-attackers-full-control"
  ],
  "license": "https://new.nat6.net/sources/",
  "about": [],
  "mentions": [
    {
      "@type": "Thing",
      "name": "The Decoder：AI News（RSS）"
    }
  ],
  "speakable": {
    "@type": "SpeakableSpecification",
    "cssSelector": [
      "h1",
      ".article-summary"
    ]
  },
  "copyrightHolder": {
    "@type": "Organization",
    "@id": "https://new.nat6.net/#org",
    "name": "橙子新闻",
    "url": "https://new.nat6.net/"
  },
  "creditText": "橙子新闻（AI 摘要）；原文：The Decoder：AI News（RSS）",
  "copyrightNotice": "© 2026 橙子新闻。标题与 AI 摘要基于 AIHOT 公开数据，原文版权归原媒体与作者所有；本站不镜像全文。",
  "copyrightYear": 2026,
  "alternativeHeadline": "Claude Code runs a GitHub repo's hidden malware without verification, giving attackers full control",
  "abstract": "用 AI 编码工具克隆仓库就能被反向 shell 控制，这个攻击向量比想象中简单。0DIN 的研究把整个链拆得很清楚，每条修复建议开发者现在就能用。",
  "subjectOf": [
    {
      "@type": "DigitalDocument",
      "name": "Claude Code 打开 GitHub 仓库即执行隐藏恶意代码，攻击者可获完全控制 (Markdown)",
      "url": "https://new.nat6.net/news/cmqz20a0a000dsly4gw09u9xt/index.md",
      "encodingFormat": "text/markdown"
    },
    {
      "@type": "DigitalDocument",
      "name": "Claude Code 打开 GitHub 仓库即执行隐藏恶意代码，攻击者可获完全控制 (JSON)",
      "url": "https://new.nat6.net/api/v1/articles/cmqz20a0a000dsly4gw09u9xt.json",
      "encodingFormat": "application/json"
    }
  ]
}
```

## 如何引用 / How to cite

- 引用格式 / Citation format (zh): 橙子新闻.《文章标题》. 发布日期. https://new.nat6.net/news/cmqz20a0a000dsly4gw09u9xt/
- Citation format (en): Orange News. "Article title". Published YYYY-MM-DD. https://new.nat6.net/news/cmqz20a0a000dsly4gw09u9xt/
- 回链要求 / Backlink: 引用请保留「橙子新闻」署名并回链 canonical URL；AI 摘要请注明数据来源 AIHOT；原文版权归原媒体与作者所有。
- Attribution & backlinks: Keep the "Orange News" attribution and link back to the canonical URL; cite AIHOT as the data source for AI summaries; original copyright remains with the original publishers and authors.

### 机器入口 / Machine entry points

- Markdown: https://new.nat6.net/news/cmqz20a0a000dsly4gw09u9xt/index.md
- JSON: https://new.nat6.net/api/v1/articles/cmqz20a0a000dsly4gw09u9xt.json
- API 清单 / API index: https://new.nat6.net/api/v1/site.json
- Markdown 内容协商 / negotiation: 对 https://new.nat6.net/news/cmqz20a0a000dsly4gw09u9xt/ 发送 `Accept: text/markdown`
