AI Security AI安全 2h ago Updated 46m ago 更新于 46分钟前 46

Critical Gitea RCE Actively Exploited as Reported Attack Drops Miner-Like Payload Gitea 关键远程代码执行漏洞遭 actively 利用,攻击者投放类挖矿载荷

CVE-2026-60004 is a critical remote code execution vulnerability (CVSS 9.8) in Gitea affecting all versions from 1.17 onward, patched in version 1.27.1 The flaw allows attackers with repository write access to inject malicious patches via the diffpatch API endpoint, planting executable Git hooks that execute arbitrary shell commands as the Gitea OS user CISA has added the vulnerability to its Known Exploited Vulnerabilities (KEV) catalog, confirming active real-world exploitation A confirmed att CISA警告CVE-2026-60004漏洞正被积极利用,影响Gitea所有1.17及以上版本,CVSS评分9.8 攻击者可通过diffpatch端点注入恶意Git hook,以Gitea系统用户权限执行任意shell命令 已有攻击者利用该漏洞部署加密货币挖矿dropper,通过HTTPS向量而非SSH进行攻击 漏洞利用前提包括默认开放注册配置,攻击者无需预存凭据即可注册账号并创建仓库获取写权限 Gitea已在1.27.1版本修复该漏洞,美国联邦机构需在2026年8月28日前完成修补

72
Hot 热度
65
Quality 质量
58
Impact 影响力

Analysis 深度分析

TL;DR

  • CVE-2026-60004 is a critical remote code execution vulnerability (CVSS 9.8) in Gitea affecting all versions from 1.17 onward, patched in version 1.27.1
  • The flaw allows attackers with repository write access to inject malicious patches via the diffpatch API endpoint, planting executable Git hooks that execute arbitrary shell commands as the Gitea OS user
  • CISA has added the vulnerability to its Known Exploited Vulnerabilities (KEV) catalog, confirming active real-world exploitation
  • A confirmed attack case shows threat actors leveraging open registration settings to register accounts, create repositories, and deploy a cryptocurrency-miner-like dropper payload
  • Federal agencies in the U.S. are required to patch the flaw by August 28, 2026

Why It Matters

This vulnerability is particularly dangerous because Gitea's default configuration allows open registration, meaning unauthenticated attackers can independently gain the write access needed to exploit the flaw without any pre-existing credentials. The active exploitation in the wild and the deployment of cryptojacking payloads demonstrate that this is not a theoretical risk but an immediate threat to organizations running self-hosted Gitea instances, especially those with default or permissive security configurations.

Technical Details

  • Vulnerability: CVE-2026-80004, CVSS score 9.8, classified as a code injection / remote code execution flaw in Gitea's diffpatch endpoint
  • Attack Vector: An attacker sends a malicious patch to the diffpatch API endpoint, which plants an executable Git hook from repository-controlled content, enabling arbitrary shell command execution as the Gitea service account
  • Affected Versions: All Gitea versions from 1.17 through pre-1.27.1; patched in Gitea 1.27.1
  • Discovered By: Security researcher Shai rod (aka NightRang3r)
  • Exploited Configuration: The real-world attack was enabled by DISABLE_REGISTRATION = false, REGISTER_EMAIL_CONFIRM = false, ENABLE_OPENID_SIGNUP = true, and REQUIRE_SIGNIN_VIEW = false, allowing unauthenticated users to self-register, create repositories, and obtain write permissions
  • Payload Behavior: The dropper script clears LD_PRELOAD and LD_LIBRARY_PATH, searches for and kills competing high-CPU processes, fetches an architecture-specific payload, executes it, and deletes the dropped file — consistent with cryptocurrency mining activity
  • Exploitation Channel: The attack was delivered over HTTPS (not SSH), confirming the vulnerability is accessible via the web API

Industry Insight

  • Organizations running self-hosted Gitea instances must immediately upgrade to version 1.27.1 or later; those unable to patch should at minimum disable open registration (DISABLE_REGISTRATION = true) and require email confirmation (REGISTER_EMAIL_CONFIRM = true) to raise the barrier for exploitation
  • The default-permissive configuration of many self-hosted Git platforms creates a broad attack surface — security teams should audit not only software versions but also configuration settings that inadvertently expose vulnerabilities to unauthenticated attackers
  • The cryptojacking payload observed in the wild suggests that threat actors are prioritizing Gitea exploitation for resource hijacking at scale, indicating this may become a sustained campaign rather than a one-off incident; monitoring for unusual CPU usage on servers hosting Gitea instances is recommended

TL;DR

  • CISA警告CVE-2026-60004漏洞正被积极利用,影响Gitea所有1.17及以上版本,CVSS评分9.8
  • 攻击者可通过diffpatch端点注入恶意Git hook,以Gitea系统用户权限执行任意shell命令
  • 已有攻击者利用该漏洞部署加密货币挖矿dropper,通过HTTPS向量而非SSH进行攻击
  • 漏洞利用前提包括默认开放注册配置,攻击者无需预存凭据即可注册账号并创建仓库获取写权限
  • Gitea已在1.27.1版本修复该漏洞,美国联邦机构需在2026年8月28日前完成修补

为什么值得看

本文揭示了开源DevOps平台Gitea面临的实际远程代码执行威胁,展示了攻击者如何利用默认配置缺陷实现从注册到代码执行的完整攻击链,对运维安全和开源软件供应链安全具有重要警示意义。

技术解析

  • 漏洞机制:Gitea的diffpatch端点存在代码注入缺陷,允许具有仓库写权限的攻击者发送恶意patch,植入可执行的Git hook并作为Gitea服务账户运行shell命令
  • 攻击条件:默认开放注册(DISABLE_REGISTRATION=false)、无需邮箱确认(REGISTER_EMAIL_CONFIRM=false)、允许OpenID注册(ENABLE_OPENID_SIGNUP=true)、无需登录即可查看(REQUIRE_SIGNIN_VIEW=false)
  • 实际攻击案例:攻击者通过HTTPS向量利用漏洞,dropper脚本执行清理环境变量、搜索高CPU进程、终止竞争进程、按架构获取payload、下载执行后删除文件等步骤,最终部署加密货币挖矿程序
  • 影响范围:所有Gitea 1.17及以上版本,已在1.27.1版本修复

行业启示

  • 开源软件默认配置安全需引起重视,开放注册等便利功能可能成为攻击入口,运维人员应定期审查并加固默认配置
  • 供应链安全威胁持续升级,攻击者正针对DevOps工具链进行定向利用,组织应建立漏洞响应机制并及时更新依赖组件
  • 联邦机构漏洞修补时限(2026年8月28日)反映了政府层面对此类威胁的重视,企业应参考类似时间表制定内部修补计划

Disclaimer: The above content is generated by AI and is for reference only. 免责声明:以上内容由 AI 生成,仅供参考。

Security 安全 Open Source 开源