# CVE-2023-29012: Git CMD erroneously executes `doskey.exe` in the current directory, if it exists

- Severity: High 7.3 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:C/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.38%, higher than 34% of CVEs (2026-12-01)
- Published: 2023-04-25T20:44:05.329Z
- Modified: 2026-06-17T05:49:11.273Z
- Weaknesses: CWE-427
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: GitHub_M

## Description

Git for Windows is the Windows port of Git. Prior to version 2.40.1, any user of Git CMD who starts the command in an untrusted directory is impacted by an Uncontrolles Search Path Element vulnerability. Maliciously-placed `doskey.exe` would be executed silently upon running Git CMD. The problem has been patched in Git for Windows v2.40.1. As a workaround, avoid using Git CMD or, if using Git CMD, avoid starting it in an untrusted directory.

(As written by CVE List.)

## Affected

- git-for-windows git: < 2.40.1
- git_for_windows_project git_for_windows: before 2.40.1

## Every score

- GitHub_M: CVSS:3.1 7.3 High `CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:C/C:H/I:H/A:H`
- NVD: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`

## References

- <https://github.com/git-for-windows/git/security/advisories/GHSA-gq5x-v87v-8f7g> (vendor-advisory)
- <https://github.com/git-for-windows/git/releases/tag/v2.40.1.windows.1> (release-notes)

## Sources

- CVE List: [CVE-2023-29012](https://www.cve.org/CVERecord?id=CVE-2023-29012), CVE Terms of Use, modified 2025-02-03
- NVD: [CVE-2023-29012](https://nvd.nist.gov/vuln/detail/CVE-2023-29012), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2023-29012 · Whole record: https://cve.day/CVE-2023-29012.json · Rebuilt by cve.day 2026-11-25T22:58:23.752Z
