一、 漏洞 CVE-2025-48384 基础信息
漏洞信息
                                        # 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版本中被修复。
                                        
提示
尽管我们采用了先进的大模型技术,但其输出仍可能包含不准确或过时的信息。
神龙会尽力确保数据准确,但也请结合实际情况进行甄别与判断。
神龙祝您一切顺利!
漏洞标题
Git allows arbitrary code execution through broken config quoting
来源:美国国家漏洞数据库 NVD
漏洞描述信息
Git is a fast, scalable, distributed revision control system with an unusually rich command set that provides both high-level operations and full access to internals. When reading a config value, Git strips any trailing carriage return and line feed (CRLF). When writing a config entry, values with a trailing CR are not quoted, causing the CR to be lost when the config is later read. When initializing a submodule, if the submodule path contains a trailing CR, the altered path is read resulting in the submodule being checked out to an incorrect location. If a symlink exists that points the altered path to the submodule hooks directory, and the submodule contains an executable post-checkout hook, the script may be unintentionally executed after checkout. This vulnerability is fixed in v2.43.7, v2.44.4, v2.45.4, v2.46.4, v2.47.3, v2.48.2, v2.49.1, and v2.50.1.
来源:美国国家漏洞数据库 NVD
CVSS信息
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:H
来源:美国国家漏洞数据库 NVD
漏洞类别
解释冲突
来源:美国国家漏洞数据库 NVD
漏洞标题
Git 安全漏洞
来源:中国国家信息安全漏洞库 CNNVD
漏洞描述信息
Git是Git开源的一套免费、开源的分布式版本控制系统。 Git存在安全漏洞,该漏洞源于在处理配置值时尾随回车符的处理不当,可能使子模块被错误检出到由符号链接指向的钩子目录,意外执行其中的可执行脚本。
来源:中国国家信息安全漏洞库 CNNVD
CVSS信息
N/A
来源:中国国家信息安全漏洞库 CNNVD
漏洞类别
其他
来源:中国国家信息安全漏洞库 CNNVD
二、漏洞 CVE-2025-48384 的公开POC
# 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详情
三、漏洞 CVE-2025-48384 的情报信息