CVE-2022-24765

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`.
Configurations

Configuration 1 (hide)

AND
cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
cpe:2.3:o:microsoft:windows:-:*:*:*:*:*:*:*

History

17 May 2022, 07:15

Type Values Removed Values Added
References
  • (FULLDISC) http://seclists.org/fulldisclosure/2022/May/31 -

16 May 2022, 20:15

Type Values Removed Values Added
References
  • (CONFIRM) https://support.apple.com/kb/HT213261 -

08 May 2022, 04:15

Type Values Removed Values Added
References
  • (FEDORA) https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/5PTN5NYEHYN2OQSHSAMCNICZNK2U4QH6/ -
  • (FEDORA) https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/BENQYTDGUL6TF3UALY6GSIEXIHUIYNWM/ -
  • (FEDORA) https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/SLP42KIZ6HACTVZMZLJLFJQ4W2XYT27M/ -

23 Apr 2022, 02:10

Type Values Removed Values Added
CPE cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
cpe:2.3:o:microsoft:windows:-:*:*:*:*:*:*:*
First Time Microsoft windows
Git-scm
Microsoft
Git-scm git
CVSS v2 : unknown
v3 : unknown
v2 : 6.9
v3 : 7.8
References (CONFIRM) https://github.com/git-for-windows/git/security/advisories/GHSA-vw2c-22j4-2fh2 - (CONFIRM) https://github.com/git-for-windows/git/security/advisories/GHSA-vw2c-22j4-2fh2 - Mitigation, Third Party Advisory
References (MISC) https://git-scm.com/docs/git#Documentation/git.txt-codeGITCEILINGDIRECTORIEScode - (MISC) https://git-scm.com/docs/git#Documentation/git.txt-codeGITCEILINGDIRECTORIEScode - Vendor Advisory
References (MLIST) http://www.openwall.com/lists/oss-security/2022/04/12/7 - (MLIST) http://www.openwall.com/lists/oss-security/2022/04/12/7 - Mailing List, Third Party Advisory
References (MISC) https://git-scm.com/book/en/v2/Appendix-A%3A-Git-in-Other-Environments-Git-in-Bash - (MISC) https://git-scm.com/book/en/v2/Appendix-A%3A-Git-in-Other-Environments-Git-in-Bash - Vendor Advisory

12 Apr 2022, 21:15

Type Values Removed Values Added
References
  • (MLIST) http://www.openwall.com/lists/oss-security/2022/04/12/7 -

12 Apr 2022, 18:52

Type Values Removed Values Added
New CVE

Information

Published : 2022-04-12 18:15

Updated : 2022-05-17 07:15


NVD link : CVE-2022-24765

Mitre link : CVE-2022-24765


JSON object : View

Products Affected

git-scm

  • git

microsoft

  • windows
CWE
CWE-427

Uncontrolled Search Path Element