# Git通过错误的配置引用执行任意代码
## 漏洞概述
Git在处理配置文件时,读取配置值时会删除末尾的CRLF,但在写入配置时不会对末尾有CR的值进行引号处理,导致CR在后续读取时丢失。如果子模块路径末尾存在CR,则会导致子模块被检出到错误的位置,可能意外执行子模块中的可执行post-checkout钩子脚本。
## 影响版本
- v2.43.7 之前版本
- v2.44.4 之前版本
- v2.45.4 之前版本
- v2.46.4 之前版本
- v2.47.3 之前版本
- v2.48.2 之前版本
- v2.49.1 之前版本
- v2.50.1 之前版本
## 细节
当Git初始化子模块时,如果子模块路径中包含尾随的CR(回车符),读取路径时会导致CR被删除,这样子模块将会被检出到一个不同的位置。如果在这个新的路径上存在一个指向子模块钩子目录的符号链接,且子模块内包含一个可执行的post-checkout钩子脚本,则在检出后脚本可能会被无意中执行。
## 影响
该问题会导致子模块被错误地检出到另一个位置,如果符号链接的存在,可能导致恶意的post-checkout钩子脚本被意外执行,存在安全风险。该漏洞已在v2.43.7, v2.44.4, v2.45.4, v2.46.4, v2.47.3, v2.48.2, v2.49.1, 和 v2.50.1版本中被修复。
# | POC 描述 | 源链接 | 神龙链接 |
---|---|---|---|
1 | Breaking git with a carriage return and cloning RCE | https://github.com/acheong08/CVE-2025-48384 | POC详情 |
2 | for CVE-2025-48384 test | https://github.com/fishyyh/CVE-2025-48384 | POC详情 |
3 | None | https://github.com/kallydev/cve-2025-48384-hook | POC详情 |
4 | None | https://github.com/fishyyh/CVE-2025-48384-POC | POC详情 |
5 | None | https://github.com/liamg/CVE-2025-48384-submodule | POC详情 |
6 | PoC for CVE-2025-48384 | https://github.com/liamg/CVE-2025-48384 | POC详情 |
7 | None | https://github.com/ppd520/CVE-2025-48384 | POC详情 |
8 | 漏洞测试 | https://github.com/NigelX/CVE-2025-48384 | POC详情 |
9 | None | https://github.com/greatyy/CVE-2025-48384-p | POC详情 |
10 | CVE-2025-48384 | https://github.com/testdjshan/CVE-2025-48384 | POC详情 |
11 | None | https://github.com/altm4n/cve-2025-48384 | POC详情 |
12 | None | https://github.com/altm4n/cve-2025-48384-hub | POC详情 |
13 | None | https://github.com/p1026/CVE-2025-48384 | POC详情 |
14 | PoC dockerfile image for CVE-2025-48384 | https://github.com/vinieger/vinieger-CVE-2025-48384-Dockerfile | POC详情 |
15 | None | https://github.com/ECHO6789/CVE-2025-48384-submodule | POC详情 |
16 | None | https://github.com/nguyentranbaotran/cve-2025-48384-poc | POC详情 |
17 | None | https://github.com/admin-ping/CVE-2025-48384-RCE | POC详情 |
标题: Arbitrary code execution through broken config quoting · Advisory · git/git · GitHub -- 🔗来源链接
标签: x_refsource_CONFIRM
神龙速读