一个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版本。

相关推荐
大卫小东(Sheldon)15 小时前
GIM 2.0 发布:真正让 AI 提交消息可定制、可控、可项目级优化
git·rust·gim
知识即是力量ol17 小时前
研发实战:Git 规范化开发全流程指南
git·gitee·github
我是一只代码狗17 小时前
idea创建分支
git
知识即是力量ol19 小时前
Git 快速入门 (实习生视角)
git·gitee·github
Dontla20 小时前
Git撤销上一次提交(撤销提交,Git回退提交)git reset、git revert
git
wdfk_prog20 小时前
解决 `git cherry-pick` 引入大量新文件的问题
大数据·git·elasticsearch
fu的博客1 天前
Git从删库到跑路
git·gitee·github
要加油哦~1 天前
git 报错 | husky - pre-commit hook exited with code 1 解决
git
知识即是力量ol1 天前
Git 实战指南:从分支管理到冲突解决
git·github·源代码管理
weixin_462446231 天前
Git 本地忽略 application-dev.yml 的最佳实践:不提交 .gitignore,不影响团队协作!
git