CVE-2022-24765
published medium CVSS 3.1 · 6.0Uncontrolled search for the Git directory in Git for Windows
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| git-for-windows | — | git< 2.35.2 | Affected | Not stated | GitHub_M |
| Amazon Linux | AL2 | Release evaluationALAS2-2022-1810 | Fixed | Not stated | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluationALAS2023-2023-065 | Fixed | Not stated | Amazon Linux assessment |
| AlmaLinux | 8 | git | Advisory build | 2.39.1-1.el8 | ALSA-2023:2859 |
| Alpine Linux | edge | git | Fixed | 2.35.2-r0 | Package fix record |
| Debian | bullseye | git | Advisory build | 1:2.30.2-1+deb11u1 | DSA-5332-1 |
| Oracle Linux | 8 | gitaarch64 | Advisory build | 0:2.39.1-1.el8 | ELSA-2023-2859 |
| Red Hat Enterprise Linux | RHEL-8 | gitaarch64 | Advisory build | 2.31.8-1.el8_6 | RHSA-2024:0407 |
Show 95 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| SUSE / openSUSE | SLE-12-SP2 | gitx86_64 | Advisory build | 2.26.2-27.52.1 | SUSE-SU-2022:1306-1 |
| AlmaLinux | 9 | git | Advisory build | 2.39.1-1.el9 | ALSA-2023:2319 |
| Alpine Linux | v3.13 | git | Fixed | 2.30.3-r0 | Package fix record |
| Alpine Linux | v3.14 | git | Fixed | 2.32.1-r0 | Package fix record |
| Alpine Linux | v3.15 | git | Fixed | 2.34.2-r0 | Package fix record |
| Alpine Linux | v3.16 | git | Fixed | 2.35.2-r0 | Package fix record |
| Alpine Linux | v3.17 | git | Fixed | 2.35.2-r0 | Package fix record |
| Alpine Linux | v3.18 | git | Fixed | 2.35.2-r0 | Package fix record |
| Alpine Linux | v3.19 | git | Fixed | 2.35.2-r0 | Package fix record |
| Alpine Linux | v3.20 | git | Fixed | 2.35.2-r0 | Package fix record |
| Alpine Linux | v3.21 | git | Fixed | 2.35.2-r0 | Package fix record |
| Alpine Linux | v3.22 | git | Fixed | 2.35.2-r0 | Package fix record |
| Alpine Linux | v3.23 | git | Fixed | 2.35.2-r0 | Package fix record |
| Alpine Linux | v3.24 | git | Fixed | 2.35.2-r0 | Package fix record |
| Debian | buster | git | Advisory build | 1:2.20.1-2+deb10u5 | DLA-3239-1 |
| Oracle Linux | 8 | gitx86_64 | Advisory build | 0:2.39.1-1.el8 | ELSA-2023-2859 |
| Oracle Linux | 9 | gitaarch64 | Advisory build | 0:2.39.1-1.el9 | ELSA-2023-2319 |
| Oracle Linux | 9 | gitx86_64 | Advisory build | 0:2.39.1-1.el9 | ELSA-2023-2319 |
| Red Hat Enterprise Linux | RHEL-8 | gitaarch64 | Advisory build | 2.39.1-1.el8 | RHSA-2023:2859 |
| Red Hat Enterprise Linux | RHEL-8 | gitppc64le | Advisory build | 2.31.8-1.el8_6 | RHSA-2024:0407 |
| Red Hat Enterprise Linux | RHEL-8 | gitppc64le | Advisory build | 2.39.1-1.el8 | RHSA-2023:2859 |
| Red Hat Enterprise Linux | RHEL-8 | gits390x | Advisory build | 2.31.8-1.el8_6 | RHSA-2024:0407 |
| Red Hat Enterprise Linux | RHEL-8 | gits390x | Advisory build | 2.39.1-1.el8 | RHSA-2023:2859 |
| Red Hat Enterprise Linux | RHEL-8 | gitsrc | Advisory build | 2.31.8-1.el8_6 | RHSA-2024:0407 |
| Red Hat Enterprise Linux | RHEL-8 | gitsrc | Advisory build | 2.39.1-1.el8 | RHSA-2023:2859 |
| Red Hat Enterprise Linux | RHEL-8 | gitx86_64 | Advisory build | 2.31.8-1.el8_6 | RHSA-2024:0407 |
| Red Hat Enterprise Linux | RHEL-8 | gitx86_64 | Advisory build | 2.39.1-1.el8 | RHSA-2023:2859 |
| Red Hat Enterprise Linux | RHEL-9 | gitaarch64 | Advisory build | 2.39.1-1.el9 | RHSA-2023:2319 |
| Red Hat Enterprise Linux | RHEL-9 | gitppc64le | Advisory build | 2.39.1-1.el9 | RHSA-2023:2319 |
| Red Hat Enterprise Linux | RHEL-9 | gits390x | Advisory build | 2.39.1-1.el9 | RHSA-2023:2319 |
| Red Hat Enterprise Linux | RHEL-9 | gitsrc | Advisory build | 2.39.1-1.el9 | RHSA-2023:2319 |
| Red Hat Enterprise Linux | RHEL-9 | gitx86_64 | Advisory build | 2.39.1-1.el9 | RHSA-2023:2319 |
| SUSE / openSUSE | SLE-12-SP3 | gitaarch64 | Advisory build | 2.26.2-27.52.1 | SUSE-SU-2022:1306-1 |
| SUSE / openSUSE | SLE-12-SP3 | gitppc64le | Advisory build | 2.26.2-27.52.1 | SUSE-SU-2022:1306-1 |
| SUSE / openSUSE | SLE-12-SP3 | gits390x | Advisory build | 2.26.2-27.52.1 | SUSE-SU-2022:1306-1 |
| SUSE / openSUSE | SLE-12-SP3 | gitx86_64 | Advisory build | 2.26.2-27.52.1 | SUSE-SU-2022:1306-1 |
| SUSE / openSUSE | SLE-12-SP4 | gitaarch64 | Advisory build | 2.26.2-27.52.1 | SUSE-SU-2022:1306-1 |
| SUSE / openSUSE | SLE-12-SP4 | gitppc64le | Advisory build | 2.26.2-27.52.1 | SUSE-SU-2022:1306-1 |
| SUSE / openSUSE | SLE-12-SP4 | gits390x | Advisory build | 2.26.2-27.52.1 | SUSE-SU-2022:1306-1 |
| SUSE / openSUSE | SLE-12-SP4 | gitx86_64 | Advisory build | 2.26.2-27.52.1 | SUSE-SU-2022:1306-1 |
| SUSE / openSUSE | SLE-12-SP5 | gitaarch64 | Advisory build | 2.26.2-27.52.1 | SUSE-SU-2022:1306-1 |
| SUSE / openSUSE | SLE-12-SP5 | gitppc64le | Advisory build | 2.26.2-27.52.1 | SUSE-SU-2022:1306-1 |
| SUSE / openSUSE | SLE-12-SP5 | gits390x | Advisory build | 2.26.2-27.52.1 | SUSE-SU-2022:1306-1 |
| SUSE / openSUSE | SLE-12-SP5 | gitx86_64 | Advisory build | 2.26.2-27.52.1 | SUSE-SU-2022:1306-1 |
| SUSE / openSUSE | SLE-15 | gitaarch64 | Advisory build | 2.26.2-150000.36.1 | SUSE-SU-2022:1260-1 |
| SUSE / openSUSE | SLE-15 | gitppc64le | Advisory build | 2.26.2-150000.36.1 | SUSE-SU-2022:1260-1 |
| SUSE / openSUSE | SLE-15 | gits390x | Advisory build | 2.26.2-150000.36.1 | SUSE-SU-2022:1260-1 |
| SUSE / openSUSE | SLE-15 | gitx86_64 | Advisory build | 2.26.2-150000.36.1 | SUSE-SU-2022:1260-1 |
| SUSE / openSUSE | SLE-15-SP1 | gitaarch64 | Advisory build | 2.26.2-150000.36.1 | SUSE-SU-2022:1260-1 |
| SUSE / openSUSE | SLE-15-SP1 | gitppc64le | Advisory build | 2.26.2-150000.36.1 | SUSE-SU-2022:1260-1 |
| SUSE / openSUSE | SLE-15-SP1 | gits390x | Advisory build | 2.26.2-150000.36.1 | SUSE-SU-2022:1260-1 |
| SUSE / openSUSE | SLE-15-SP1 | gitx86_64 | Advisory build | 2.26.2-150000.36.1 | SUSE-SU-2022:1260-1 |
| SUSE / openSUSE | SLE-15-SP2 | gitaarch64 | Advisory build | 2.26.2-150000.36.1 | SUSE-SU-2022:1260-1 |
| SUSE / openSUSE | SLE-15-SP2 | gitppc64le | Advisory build | 2.26.2-150000.36.1 | SUSE-SU-2022:1260-1 |
| SUSE / openSUSE | SLE-15-SP2 | gits390x | Advisory build | 2.26.2-150000.36.1 | SUSE-SU-2022:1260-1 |
| SUSE / openSUSE | SLE-15-SP2 | gitx86_64 | Advisory build | 2.26.2-150000.36.1 | SUSE-SU-2022:1260-1 |
| SUSE / openSUSE | SLE-15-SP3 | gitaarch64 | Advisory build | 2.35.3-150300.10.12.1 | SUSE-SU-2022:1484-1 |
| SUSE / openSUSE | SLE-15-SP3 | gitppc64le | Advisory build | 2.35.3-150300.10.12.1 | SUSE-SU-2022:1484-1 |
| SUSE / openSUSE | SLE-15-SP3 | gits390x | Advisory build | 2.35.3-150300.10.12.1 | SUSE-SU-2022:1484-1 |
| SUSE / openSUSE | SLE-15-SP3 | gitx86_64 | Advisory build | 2.35.3-150300.10.12.1 | SUSE-SU-2022:1484-1 |
| SUSE / openSUSE | openSUSE-Leap-15.3 | gitaarch64 | Advisory build | 2.35.3-150300.10.12.1 | SUSE-SU-2022:1484-1 |
| SUSE / openSUSE | openSUSE-Leap-15.3 | gitppc64le | Advisory build | 2.35.3-150300.10.12.1 | SUSE-SU-2022:1484-1 |
| SUSE / openSUSE | openSUSE-Leap-15.3 | gits390x | Advisory build | 2.35.3-150300.10.12.1 | SUSE-SU-2022:1484-1 |
| SUSE / openSUSE | openSUSE-Leap-15.3 | gitx86_64 | Advisory build | 2.35.3-150300.10.12.1 | SUSE-SU-2022:1484-1 |
| SUSE / openSUSE | openSUSE-Leap-15.4 | gitaarch64 | Advisory build | 2.35.3-150300.10.12.1 | SUSE-SU-2022:1484-1 |
| SUSE / openSUSE | openSUSE-Leap-15.4 | gitppc64le | Advisory build | 2.35.3-150300.10.12.1 | SUSE-SU-2022:1484-1 |
| SUSE / openSUSE | openSUSE-Leap-15.4 | gits390x | Advisory build | 2.35.3-150300.10.12.1 | SUSE-SU-2022:1484-1 |
| SUSE / openSUSE | openSUSE-Leap-15.4 | gitx86_64 | Advisory build | 2.35.3-150300.10.12.1 | SUSE-SU-2022:1484-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | gitaarch64 | Advisory build | 2.35.3-1.1 | OPENSUSE-SU-2024:12003-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | gitppc64le | Advisory build | 2.35.3-1.1 | OPENSUSE-SU-2024:12003-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | gits390x | Advisory build | 2.35.3-1.1 | OPENSUSE-SU-2024:12003-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | gitx86_64 | Advisory build | 2.35.3-1.1 | OPENSUSE-SU-2024:12003-1 |
| AlmaLinux | 8 | git-all | Advisory build | 2.39.1-1.el8 | ALSA-2023:2859 |
| AlmaLinux | 8 | git-core | Advisory build | 2.39.1-1.el8 | ALSA-2023:2859 |
| AlmaLinux | 8 | git-core-doc | Advisory build | 2.39.1-1.el8 | ALSA-2023:2859 |
| AlmaLinux | 8 | git-credential-libsecret | Advisory build | 2.39.1-1.el8 | ALSA-2023:2859 |
| AlmaLinux | 8 | git-daemon | Advisory build | 2.39.1-1.el8 | ALSA-2023:2859 |
| AlmaLinux | 8 | git-email | Advisory build | 2.39.1-1.el8 | ALSA-2023:2859 |
| AlmaLinux | 8 | git-gui | Advisory build | 2.39.1-1.el8 | ALSA-2023:2859 |
| AlmaLinux | 8 | git-instaweb | Advisory build | 2.39.1-1.el8 | ALSA-2023:2859 |
| AlmaLinux | 8 | git-subtree | Advisory build | 2.39.1-1.el8 | ALSA-2023:2859 |
| AlmaLinux | 8 | git-svn | Advisory build | 2.39.1-1.el8 | ALSA-2023:2859 |
| AlmaLinux | 8 | gitk | Advisory build | 2.39.1-1.el8 | ALSA-2023:2859 |
| AlmaLinux | 8 | gitweb | Advisory build | 2.39.1-1.el8 | ALSA-2023:2859 |
| AlmaLinux | 8 | perl-Git | Advisory build | 2.39.1-1.el8 | ALSA-2023:2859 |
| AlmaLinux | 8 | perl-Git-SVN | Advisory build | 2.39.1-1.el8 | ALSA-2023:2859 |
| AlmaLinux | 9 | git-all | Advisory build | 2.39.1-1.el9 | ALSA-2023:2319 |
| AlmaLinux | 9 | git-core | Advisory build | 2.39.1-1.el9 | ALSA-2023:2319 |
| AlmaLinux | 9 | git-core-doc | Advisory build | 2.39.1-1.el9 | ALSA-2023:2319 |
| AlmaLinux | 9 | git-credential-libsecret | Advisory build | 2.39.1-1.el9 | ALSA-2023:2319 |
| AlmaLinux | 9 | git-daemon | Advisory build | 2.39.1-1.el9 | ALSA-2023:2319 |
| AlmaLinux | 9 | git-email | Advisory build | 2.39.1-1.el9 | ALSA-2023:2319 |
| AlmaLinux | 9 | git-gui | Advisory build | 2.39.1-1.el9 | ALSA-2023:2319 |
| AlmaLinux | 9 | git-instaweb | Advisory build | 2.39.1-1.el9 | ALSA-2023:2319 |
| AlmaLinux | 9 | git-subtree | Advisory build | 2.39.1-1.el9 | ALSA-2023:2319 |
Package entries are limited to the first 100 builds and 100 linked advisories.
Description
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`.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 6.0 / 10
- Severity
- medium
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:N
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| git-for-windows | git | < 2.35.2 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-427 CWE-427: Uncontrolled Search Path Element
References
17- 20220516 APPLE-SA-2022-05-16-8 Xcode 13.4 http://seclists.org/fulldisclosure/2022/May/31
- [oss-security] 20220412 git v2.35.2 and friends for CVE-2022-24765 http://www.openwall.com/lists/oss-security/2022/04/12/7
- https://git-scm.com/book/en/v2/Appendix-A%3A-Git-in-Other-Environments-Git-in-Bash
- https://git-scm.com/docs/git#Documentation/git.txt-codeGITCEILINGDIRECTORIEScode
- https://github.com/git-for-windows/git/security/advisories/GHSA-vw2c-22j4-2fh2
- [debian-lts-announce] 20221213 [SECURITY] [DLA 3239-1] git security update https://lists.debian.org/debian-lts-announce/2022/12/msg00025.html
- FEDORA-2022-e99ae504f5 https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/5PTN5NYEHYN2OQSHSAMCNICZNK2U4QH6/
- FEDORA-2022-3759ebabd2 https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BENQYTDGUL6TF3UALY6GSIEXIHUIYNWM/
- FEDORA-2022-2a5de7cb8b https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/DDI325LOO2XBDDKLINOAQJEG6MHAURZE/
- FEDORA-2023-470c7ea49e https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/DIKWISWUDFT2FAITYIA6372BVLH3OOOC/
- FEDORA-2023-1068309389 https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/HVOLER2PIGMHPQMDGG4RDE2KZB74QLA2/
- FEDORA-2022-2fec5f30be https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/SLP42KIZ6HACTVZMZLJLFJQ4W2XYT27M/
- FEDORA-2022-dfd7e7fc0e https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TRZG5CDUQ27OWTPC5MQOR4UASNXHWEZS/
- FEDORA-2023-3ec32f6d4e https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/UDZRZAL7QULOB6V7MKT66MOMWJLBJPX4/
- FEDORA-2023-e3c8abd37e https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/YROCMBWYFKRSS64PO6FUNM6L7LKBUKVW/
- GLSA-202312-15 https://security.gentoo.org/glsa/202312-15
- https://support.apple.com/kb/HT213261
Provider assertions
3GitHub_M · cna
Uncontrolled search for the Git directory in Git for Windows
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 64f042cc9345ab640fbcd740d1c418a6b04b05e5e7ee8682b31abc48e159bc4b
- Ingested
- 23 Sep 2026, 07:58:57 UTC
- Source record
- Official CVE record