一个git相关的cve:CVE-2024-32002

最近听说一个与自己相关的CVE, CVE-2024-32002

文章目录


前言

cve git windows hook submodule

利用submodule和hook,实现对.git目录注入hook的目标。

影响windows和mac os下的大部分git版本。


提示:以下是本篇文章正文内容,下面案例可供参考

Description

Git is a revision control system. Prior to versions 2.45.1, 2.44.1, 2.43.4, 2.42.2, 2.41.1, 2.40.2, and 2.39.4, repositories with submodules can be crafted in a way that exploits a bug in Git whereby it can be fooled into writing files not into the submodule's worktree but into a .git/ directory. This allows writing a hook that will be executed while the clone operation is still running, giving the user no opportunity to inspect the code that is being executed. The problem has been patched in versions 2.45.1, 2.44.1, 2.43.4, 2.42.2, 2.41.1, 2.40.2, and 2.39.4. If symbolic link support is disabled in Git (e.g. via git config --global core.symlinks false), the described attack won't work. As always, it is best to avoid cloning repositories from untrusted sources.

二、PATCH

https://github.com/git/git/commit/97065761333fd62db1912d81b489db938d8c991d


总结

提示:windows下,应尽快换最新的git版本。

相关推荐
weixin_402278452 小时前
VS code 本地推送github添加SSH设置
运维·git·ssh
笑望灬星辰4 小时前
VS Code 编辑器 Git 工具 - 分支操作【保姆级教程】
git·vscode·编辑器
shisanjin1234 小时前
关于 IDEA2025 版本中对 git 的操作与使用
git·github·idea
熬夜敲代码的小N4 小时前
鸿蒙PC开发者必备!GitNext深度测评:一站式Git管理工具
git·华为·harmonyos
坚果派·白晓明4 小时前
【开发者必备工具】Windows 11 安装 Git 完整指南
windows·git·项目开发必备工具·参与开源项目必备工具
cooldream20094 小时前
Git实战指南:从Gitee拉取到推送的完整工作流详解
git·gitee
希望未来不会秃4 小时前
【Git实战】如何将本地已有项目关联并推送到指定的远程仓库(保姆级教程)
git·gitee·github
挂科边缘5 小时前
2026 Git 安装流程和基础使用步骤(保姆级教程)
git
LIO7 小时前
前端开发之Git 代码仓库管理详细教程
前端·git
大山同学8 小时前
DeepSeek-TUI:1M 上下文、递归子代理与 Git 沙箱回滚
git