CVE-2022-24765 Details
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`.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Dec 16, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-427 | Uncontrolled Search Path Element | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| git-scm git | < 2.35.2 |
CPE
Remediation
| |
| microsoft windows | All versions |
CPE
Remediation
| |
| fedoraproject fedora | 34 35 36 37 |
CPE
Remediation
| |
| apple xcode | < 13.4 |
CPE
Remediation
| |
| debian debian linux | 10.0 |
CPE
Remediation
| |
Change History
21 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Jun 17, 2026 | CVE Modified | [email protected] |
| Nov 21, 2024 | CVE Modified | CVE |
| May 14, 2024 | CVE Modified | [email protected] |
| Dec 27, 2023 | CVE Modified | [email protected] |
| Nov 7, 2023 | CVE Modified | [email protected] |
| Feb 27, 2023 | Modified Analysis | [email protected] |
| Jan 31, 2023 | CVE Modified | [email protected] |
| Jan 30, 2023 | CVE Modified | [email protected] |
| Jan 29, 2023 | CVE Modified | [email protected] |
| Jan 27, 2023 | CVE Modified | [email protected] |
| Dec 14, 2022 | CVE Modified | [email protected] |
| Oct 6, 2022 | Modified Analysis | [email protected] |
| Jul 29, 2022 | CVE Modified | [email protected] |
| Jul 21, 2022 | CVE Modified | [email protected] |
| May 17, 2022 | CVE Modified | [email protected] |
| May 16, 2022 | CVE Modified | [email protected] |
| May 8, 2022 | CVE Modified | [email protected] |
| May 8, 2022 | CVE Modified | [email protected] |
| Apr 23, 2022 | Initial Analysis | [email protected] |
| Apr 12, 2022 | CVE Modified | [email protected] |