GitHub 高危 RCE 漏洞 CVE-2026-3854:单条 git push 即可远程执行代码,88% Enterprise Server 实例曾受影响
-
GitHub.com 与 GitHub Enterprise Server 被披露存在高危远程代码执行漏洞 CVE-2026-3854(CVSS 8.7),Wiz 安全研究团队 3 月 4 日上报,GitHub 在 2 小时内向 GitHub.com 部署修复,Enterprise Server 修复版本为 3.14.25、3.15.20、3.16.16、3.17.13、3.18.8、3.19.4、3.20.0 及以上。漏洞根因是 git push 操作时用户提供的 push option 值未经过滤即被拼接进 GitHub 内部 X-Stat 头部,而该内部头部使用分号作为分隔符——同样可出现在用户输入中——攻击者由此能注入额外的元数据字段。Wiz 描述利用链由三段注入串成:先注入非生产环境的
rails_env绕过沙箱,再注入custom_hooks_dir重定向 hook 目录,最后通过repo_pre_receive_hooks配合路径遍历以 git 用户身份执行任意命令。任何对仓库具备 push 权限的认证用户均可触发。漏洞影响范围远超表面:在 GitHub.com 的多租户架构下,攻击者一旦在共享存储节点上获得代码执行,即可跨租户读取数百万仓库的内容,与组织或用户归属无关。Wiz 描述其"利用难度极低",公开披露时仍有约 88% 的 Enterprise Server 实例处于易受攻击状态。GitHub.com 看似多了一道"Enterprise 模式标志为 false 时 custom hooks 路径不激活"的保护,但该标志同样通过 X-Stat 头部传递、可被同一注入手法覆写,因此 SaaS 实例同样可被攻陷。GitHub 首席信息安全官 Alexis Wales 在官方博客确认尚未发现该漏洞被恶意利用的证据,并强调该事件再次提醒"使用不同语言开发的多个内部服务通过共享内部协议传递数据时,每个服务对数据格式的隐含假设本身就是关键攻击面"。Wiz 建议所有运营多服务架构的团队系统性审计用户可控输入在内部协议中的流动路径,尤其是当安全相关配置直接派生自共享数据格式时。
The Hacker News | GitHub Blog | Wiz | SecurityWeek | NVD
Researchers Discover Critical GitHub CVE-2026-3854 RCE Flaw Exploitable via Single Git Push
CVE-2026-3854 (CVSS 8.7) enabled GitHub RCE via git push, risking cross-tenant access to millions of repositories.
The Hacker News (thehackernews.com)
Securing the git push pipeline: Responding to a critical remote code execution vulnerability
How we validated, fixed, and investigated a critical vulnerability in under two hours, and confirmed no exploitation.
The GitHub Blog (github.blog)
GitHub RCE Vulnerability: CVE-2026-3854 Breakdown | Wiz Blog
A CVSS 8.7 vulnerability in GitHub Enterprise Server allows remote code execution. Read the threat brief and find vulnerable GHES instances from Wiz.
wiz.io (www.wiz.io)
Critical GitHub Vulnerability Exposed Millions of Repositories
Wiz discovered a critical remote code execution vulnerability in GitHub that exposed millions of repositories.
SecurityWeek (www.securityweek.com)