CVE-2022-24765
mediumpriority · track · 31EPSS 0.010 · 63 %ileDEEURUUSEPSS · scored 2026-10-27
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`.
remediations
Vendor fix, mitigation, or workaround guidance, as published by each source.
A vendor fix is available.
- FixedPLCnext Engineerphoenix_contact_psirt
Update PLCnext Engineer to 2023.6.
- MitigationPLCnext Engineerphoenix_contact_psirt
To mitigate aforementioned vulnerabilities the integrity and authenticity of the git configuration data must be ensured. Otherwise, we kindly advise you to refrain from using the version control feature in version lower than 2023.6
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode⚠ sources disagree · medium–high · 6–7.8
ssvc
A stakeholder decision — act, attend, or track — from exploitation and impact.
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (57)
Products and version ranges known to be affected.
advisories (4)
Vendor and ecosystem advisories describing this.
- VDE-2023-016Phoenix Contact: PLCnext Engineer Vulnerabilities in LibGit2Sharp/LibGit22023-08-08csaf · phoenix_contact_psirtDE
Several vulnerabilities have been discovered in the LibGit2Sharp or underlying LibGit2 library.This open-source component is widely used in a lot of products worldwide.The product is vulnerable to remote code execution, privilege escalation and tampering.PLCnext Engineer is using the LibGit2Sharp library to provide version control capabilities.
- WID-SEC-W-2022-0252git: Schwachstelle ermöglicht PrivilegieneskalationDeutsch2022-04-12csaf · cert_bundDE
Ein lokaler Angreifer kann eine Schwachstelle in git und Ubuntu Linux ausnutzen, um seine Privilegien zu erhöhen.
- WID-SEC-W-2023-0561Xerox FreeFlow Print Server: Mehrere SchwachstellenDeutsch2023-03-02csaf · cert_bundDE
Ein entfernter, anonymer Angreifer kann mehrere Schwachstellen in Xerox FreeFlow Print Server ausnutzen, um die Vertraulichkeit, Verfügbarkeit und Integrität des Systems zu gefährden.
- BIT-git-2022-24765Uncontrolled search for the Git directory in Git for Windows2026-08-17vendor · osvUS
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`.
also known as (4)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (75)
External citations — patches, advisories, analysis.
- http://seclists.org/fulldisclosure/2022/May/31cnnvd
- http://www.openwall.com/lists/oss-security/2022/04/12/7cnnvd
- https://access.redhat.com/security/cve/cve-2022-24765cnnvd
- https://cxsecurity.com/cveshow/CVE-2022-24765/cnnvd
- https://git-scm.com/book/en/v2/Appendix-A%3A-Git-in-Other-Environments-Git-in-Bashcnnvd
- https://git-scm.com/docs/git#Documentation/git.txt-codeGITCEILINGDIRECTORIEScodecnnvd
- https://github.com/git-for-windows/git/security/advisories/GHSA-vw2c-22j4-2fh2cnnvd
- https://lists.debian.org/debian-lts-announce/2022/12/msg00025.htmlcnnvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan