VDB

CVE-2023-25815

CVE-2023-25815 PUBLISHED CVSS 3.3 LOW

Git looks for localized messages in the wrong place

Reported by github_m · Published April 25, 2023

In Git for Windows, the Windows port of Git, no localized messages are shipped with the installer. As a consequence, Git is expected not to localize messages at all, and skips the gettext initialization. However, due to a change in MINGW-packages, the `gettext()` function's implicit initialization no longer uses the runtime prefix but uses the hard-coded path `C:\mingw64\share\locale` to look for localized messages. And since any authenticated user has the permission to create folders in `C:\` (and since `C:\mingw64` does not typically exist), it is possible for low-privilege users to place fake messages in that location where `git.exe` will pick them up in version 2.40.1. This vulnerability is relatively hard to exploit and requires social engineering. For example, a legitimate message at the end of a clone could be maliciously modified to ask the user to direct their web browser to a malicious website, and the user might think that the message comes from Git and is legitimate. It does require local write access by the attacker, though, which makes this attack vector less likely. Version 2.40.1 contains a patch for this issue. Some workarounds are available. Do not work on a Windows machine with shared accounts, or alternatively create a `C:\mingw64` folder and leave it empty. Users who have administrative rights may remove the permission to create folders in `C:\`.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
git_for_windowsgit_for_windows_project2.40.1
Microsoft .NET Framework 3.5Microsoft3.0.6920.8954; 2.0.50727.8970

Risk scores

CVSS 3.1
3.3
CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:N/I:L/A:L

Affected products

VendorProductVersions
git-for-windowsgit< 2.40.1
git-for-windowsgit0
alpinegit0, 0, 0

Timeline

  • Apr 25, 2023 CVE Published
  • Apr 26, 2023 EPSS Score (30 in total, the first dated here)
  • Oct 5, 2023 PoC Published (2 in total, the first dated here)
  • Feb 19, 2026 Security Advisory (30 in total, the first dated here)
  • Mar 21, 2026 Distribution Patch (24 in total, the first dated here)
  • Nov 2, 2026 CVE Updated

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2023-25815
vulnetix vdb fixes CVE-2023-25815

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2023-25815/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›