LiveActive security incident?Get immediate response
CVE Record

CVE-2022-31012: Git for Windows' installer can be tricked into executing an untrusted binary

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:\`.

HighCVSS 8.2Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

This is a Windows installer risk, not a normal Git repository bug. Before Git for Windows 2.37.1, a fresh install could mistakenly run an untrusted git.exe placed in a Windows path. Successful abuse could give the attacker code execution during installation. Upgrades are not described as affected.

Executive priority

Treat this as high priority where developer workstations, CI hosts, or shared Windows systems allowed fresh Git for Windows installs before 2.37.1. The fix path is straightforward: update installers and harden root-drive permissions.

Technical view

CVE-2022-31012 is a CWE-426 untrusted search path issue in Git for Windows installers before 2.37.1. The installer could execute a binary at C:\mingw64\bin\git.exe during a fresh install. The CVSS 3.1 score is 8.2 with local access, low complexity, low privileges, and required user interaction.

Likely exposure

Exposure is most likely on Windows endpoints or build machines where Git for Windows before 2.37.1 was freshly installed and authenticated users could create folders under C:\. Routine upgrades are specifically stated as not affected.

Exploitation context

The source bundle does not show KEV listing or cited evidence of active exploitation. Abuse requires local authenticated access and user interaction with a fresh Git for Windows installation, but impact is high if the installer runs the untrusted binary.

Researcher notes

The strongest exposure condition is the combination of a vulnerable fresh installer and permissive C:\ folder creation. Sources name two workarounds and a fixed release. They do not provide evidence of active exploitation or broadened affected products beyond Git for Windows.

Mitigation direction

  • Install Git for Windows 2.37.1 or later.
  • Use only current trusted Git for Windows installers.
  • Create C:\mingw64 and remove read/write access as documented.
  • Disallow arbitrary authenticated users from creating folders in C:\.
  • Check vendor guidance for any newer installation hardening advice.

Validation and detection

  • Inventory Git for Windows versions on Windows systems.
  • Identify endpoints using Git for Windows older than 2.37.1.
  • Confirm whether affected systems received fresh installs, not only upgrades.
  • Review C:\ permissions for authenticated-user folder creation.
  • Check for unexpected C:\mingw64\bin\git.exe presence.
Prepared
Confidence
high
Sources
4

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · low confidence lookup

CWE-426: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2022-31012 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
High
CVSS
8.2 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
3Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
8.2CVSS 3.1HighCVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H1.56Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

8.2High
CVSS 3.1 vector shape for CVE-2022-31012Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
git-for-windowsgit< 2.37.1Listed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-426 · source CWE mapping

Untrusted Search Path

Untrusted Search Path represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.