{"api_version":"1","generated_at":"2026-04-23T08:40:45+00:00","cve":"CVE-2022-31012","urls":{"html":"https://cve.report/CVE-2022-31012","api":"https://cve.report/api/cve/CVE-2022-31012.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2022-31012","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2022-31012"},"summary":{"title":"CVE-2022-31012","description":"Git for Windows is a fork of Git that contains Windows-specific patches. This vulnerability in versions prior to 2.37.1 lets Git for Windows' installer execute a binary into `C:\\mingw64\\bin\\git.exe` by mistake. This only happens upon a fresh install, not when upgrading Git for Windows. A patch is included in version 2.37.1. Two workarounds are available. Create the `C:\\mingw64` folder and remove read/write access from this folder, or disallow arbitrary authenticated users to create folders in `C:\\`.","state":"PUBLIC","assigner":"security-advisories@github.com","published_at":"2022-07-12 21:15:00","updated_at":"2022-07-22 16:50:00"},"problem_types":["CWE-426"],"metrics":[],"references":[{"url":"https://github.com/git-for-windows/git/releases/tag/v2.37.1.windows.1","name":"https://github.com/git-for-windows/git/releases/tag/v2.37.1.windows.1","refsource":"MISC","tags":[],"title":"Release Git for Windows 2.37.1 · git-for-windows/git · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/git-for-windows/git/security/advisories/GHSA-gjrj-fxvp-hjj2","name":"https://github.com/git-for-windows/git/security/advisories/GHSA-gjrj-fxvp-hjj2","refsource":"CONFIRM","tags":[],"title":"Git for Windows' installer can be tricked into executing an untrusted binary · Advisory · git-for-windows/git · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://www.cve.org/CVERecord?id=CVE-2022-31012","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-31012","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[{"cve_year":"2022","cve_id":"31012","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"gitforwindows","cpe5":"git","cpe6":"*","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"windows","cpe12":"*","cpe13":"*"}],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[{"cve":"CVE-2022-31012","qid":"379406","title":"Git for Windows Multiple Security Vulnerability (CVE-2022-29187,CVE-2022-31012)"}]},"source_records":{"cve_program":{"CVE_data_meta":{"ASSIGNER":"security-advisories@github.com","ID":"CVE-2022-31012","STATE":"PUBLIC","TITLE":"Git for Windows' installer can be tricked into executing an untrusted binary"},"affects":{"vendor":{"vendor_data":[{"product":{"product_data":[{"product_name":"git","version":{"version_data":[{"version_value":"< 2.37.1"}]}}]},"vendor_name":"git-for-windows"}]}},"data_format":"MITRE","data_type":"CVE","data_version":"4.0","description":{"description_data":[{"lang":"eng","value":"Git for Windows is a fork of Git that contains Windows-specific patches. This vulnerability in versions prior to 2.37.1 lets Git for Windows' installer execute a binary into `C:\\mingw64\\bin\\git.exe` by mistake. This only happens upon a fresh install, not when upgrading Git for Windows. A patch is included in version 2.37.1. Two workarounds are available. Create the `C:\\mingw64` folder and remove read/write access from this folder, or disallow arbitrary authenticated users to create folders in `C:\\`."}]},"impact":{"cvss":{"attackComplexity":"LOW","attackVector":"LOCAL","availabilityImpact":"HIGH","baseScore":8.2,"baseSeverity":"HIGH","confidentialityImpact":"HIGH","integrityImpact":"HIGH","privilegesRequired":"LOW","scope":"CHANGED","userInteraction":"REQUIRED","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H","version":"3.1"}},"problemtype":{"problemtype_data":[{"description":[{"lang":"eng","value":"CWE-426: Untrusted Search Path"}]}]},"references":{"reference_data":[{"name":"https://github.com/git-for-windows/git/security/advisories/GHSA-gjrj-fxvp-hjj2","refsource":"CONFIRM","url":"https://github.com/git-for-windows/git/security/advisories/GHSA-gjrj-fxvp-hjj2"},{"name":"https://github.com/git-for-windows/git/releases/tag/v2.37.1.windows.1","refsource":"MISC","url":"https://github.com/git-for-windows/git/releases/tag/v2.37.1.windows.1"}]},"source":{"advisory":"GHSA-gjrj-fxvp-hjj2","discovery":"UNKNOWN"}},"nvd":{"publishedDate":"2022-07-12 21:15:00","lastModifiedDate":"2022-07-22 16:50:00","problem_types":["CWE-426"],"metrics":{"baseMetricV3":{"cvssV3":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"REQUIRED","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH","baseScore":7.3,"baseSeverity":"HIGH"},"exploitabilityScore":1.3,"impactScore":5.9},"baseMetricV2":{"cvssV2":{"version":"2.0","vectorString":"AV:L/AC:M/Au:N/C:P/I:P/A:P","accessVector":"LOCAL","accessComplexity":"MEDIUM","authentication":"NONE","confidentialityImpact":"PARTIAL","integrityImpact":"PARTIAL","availabilityImpact":"PARTIAL","baseScore":4.4},"severity":"MEDIUM","exploitabilityScore":3.4,"impactScore":6.4,"acInsufInfo":false,"obtainAllPrivilege":false,"obtainUserPrivilege":false,"obtainOtherPrivilege":false,"userInteractionRequired":true}},"configurations":{"CVE_data_version":"4.0","nodes":[{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:gitforwindows:git:*:*:*:*:*:windows:*:*","versionEndExcluding":"2.37.1","cpe_name":[]}]}]}},"legacy_mitre":{"record":null,"notes":[]}}}