CVE-2022-24765 (CNNVD-202204-2943)
中文标题:
Git for Windows 代码问题漏洞
英文标题:
Uncontrolled search for the Git directory in Git for Windows
漏洞描述
中文描述:
Git for Windows是Git groups的用于 Windows 的 Git。 Git for Windows 存在代码问题漏洞,该漏洞源于在多用户计算机上不受信任的各方对同一硬盘具有写访问权限。
英文描述:
Git for Windows is a fork of Git containing Windows-specific patches. This vulnerability affects users working on multi-user machines, where untrusted parties have write access to the same hard disk. Those untrusted parties could create the folder `C:\.git`, which would be picked up by Git operations run supposedly outside a repository while searching for a Git directory. Git would then respect any config in said Git directory. Git Bash users who set `GIT_PS1_SHOWDIRTYSTATE` are vulnerable as well. Users who installed posh-gitare vulnerable simply by starting a PowerShell. Users of IDEs such as Visual Studio are vulnerable: simply creating a new project would already read and respect the config specified in `C:\.git\config`. Users of the Microsoft fork of Git are vulnerable simply by starting a Git Bash. The problem has been patched in Git for Windows v2.35.2. Users unable to upgrade may create the folder `.git` on all drives where Git commands are run, and remove read/write access from those folders as a workaround. Alternatively, define or extend `GIT_CEILING_DIRECTORIES` to cover the _parent_ directory of the user profile, e.g. `C:\Users` if the user profile is located in `C:\Users\my-user-name`.
CWE类型:
标签:
受影响产品
| 厂商 | 产品 | 版本 | 版本范围 | 平台 | CPE |
|---|---|---|---|---|---|
| git-for-windows | git | < 2.35.2 | - | - |
cpe:2.3:a:git-for-windows:git:<_2.35.2:*:*:*:*:*:*:*
|
| git-scm | git | * | - | - |
cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
|
| fedoraproject | fedora | 34 | - | - |
cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*
|
| fedoraproject | fedora | 35 | - | - |
cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*
|
| fedoraproject | fedora | 36 | - | - |
cpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:*
|
| fedoraproject | fedora | 37 | - | - |
cpe:2.3:o:fedoraproject:fedora:37:*:*:*:*:*:*:*
|
| apple | xcode | * | - | - |
cpe:2.3:a:apple:xcode:*:*:*:*:*:*:*:*
|
| debian | debian_linux | 10.0 | - | - |
cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*
|
解决方案
中文解决方案:
英文解决方案:
临时解决方案:
参考链接
cve.org
cve.org
cve.org
cve.org
cve.org
cve.org
cve.org
cve.org
cve.org
cve.org
cve.org
cve.org
cve.org
cve.org
cve.org
cve.org
cve.org
CVSS评分详情
3.1 (cna)
MEDIUMCVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:N
时间信息
利用信息
数据源详情
| 数据源 | 记录ID | 版本 | 提取时间 |
|---|---|---|---|
| CVE | cve_CVE-2022-24765 |
2025-11-11 15:21:19 | 2025-11-11 07:37:22 |
| NVD | nvd_CVE-2022-24765 |
2025-11-11 14:58:16 | 2025-11-11 07:45:38 |
| CNNVD | cnnvd_CNNVD-202204-2943 |
2025-11-11 15:10:52 | 2025-11-11 07:57:14 |
版本与语言
安全公告
变更历史
查看详细变更
- vulnerability_type: 未提取 -> 代码问题
- cnnvd_id: 未提取 -> CNNVD-202204-2943
- data_sources: ['cve', 'nvd'] -> ['cnnvd', 'cve', 'nvd']
查看详细变更
- affected_products_count: 1 -> 8
- data_sources: ['cve'] -> ['cve', 'nvd']