CVE-2023-25815
CVE-2023-25815 is a low-severity vulnerability in Git For Windows Project Git For Windows with a CVSS 3.x base score of 3.3. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-134.
Key facts
- Severity: Low (CVSS 3.x base score 3.3)
- EPSS exploit prediction: 1% (60th percentile)
- Actively exploited: Not listed in CISA KEV
- Weakness: CWE-134
- Affected product: Git For Windows Project Git For Windows
- Published:
- Last modified:
Description
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:\`.
Frequently asked questions
- What is CVE-2023-25815?
- 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:\`.
- How severe is CVE-2023-25815?
- CVE-2023-25815 has a CVSS 3.x base score of 3.3, rated low severity. It is exploitable over local access with high attack complexity, requires low privileges and user interaction. Impact on confidentiality is none, integrity low, and availability low.
- Is CVE-2023-25815 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 1% (60th percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2023-25815?
- CVE-2023-25815 primarily affects Git For Windows Project Git For Windows. In total, 3 product configurations (CPEs) are listed as vulnerable; see the affected-products list for the exact versions.
- How do I fix CVE-2023-25815?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround.
- When was CVE-2023-25815 published?
- CVE-2023-25815 was published on 2023-04-25 and last updated on 2026-06-17.
References
- http://www.openwall.com/lists/oss-security/2023/04/25/2
- https://axcheron.github.io/exploit-101-format-strings/#writing-to-the-stack
- https://github.com/git-for-windows/git/releases/tag/v2.40.1.windows.1
- https://github.com/git-for-windows/git/security/advisories/GHSA-9w66-8mq8-5vm8
- https://github.com/msys2/MINGW-packages/pull/10461
- https://lists.debian.org/debian-lts-announce/2024/06/msg00018.html
- https://lists.fedoraproject.org/archives/list/[email protected]/message/PI7FZ4NNR5S5J5K6AMVQBH2JFP6NE4L7/
- https://lists.fedoraproject.org/archives/list/[email protected]/message/RKOXOAZ42HLXHXTW6JZI4L5DAIYDTYCU/
- https://lists.fedoraproject.org/archives/list/[email protected]/message/YFZWGQKB6MM5MNF2DLFTD7KS2KWPICKL/
- https://pubs.opengroup.org/onlinepubs/9699919799/functions/printf.html
- https://security.gentoo.org/glsa/202312-15
- https://lists.debian.org/debian-lts-announce/2024/09/msg00009.html
Affected products (3)
- cpe:2.3:a:git_for_windows_project:git_for_windows:*:*:*:*:*:*:*:*
- cpe:2.3:o:fedoraproject:fedora:37:*:*:*:*:*:*:*
- cpe:2.3:o:fedoraproject:fedora:38:*:*:*:*:*:*:*
More vulnerabilities in Git For Windows Project Git For Windows
- CVE-2023-23618 — High (CVSS 8.6): Git for Windows is the Windows port of the revision control system Git. Prior to Git for Windows version 2.39.2, when…
- CVE-2022-24767 — High (CVSS 7.8): GitHub: Git for Windows' uninstaller vulnerable to DLL hijacking when run under the SYSTEM user account.
- CVE-2016-9274 — High (CVSS 7.8): Untrusted search path vulnerability in Git 1.x for Windows allows local users to gain privileges via a Trojan horse…
- CVE-2023-29011 — High (CVSS 7.5): Git for Windows, the Windows port of Git, ships with an executable called `connect.exe`, which implements a SOCKS5…
- CVE-2023-29012 — High (CVSS 7.2): 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…
- CVE-2023-22743 — High (CVSS 7.2): Git for Windows is the Windows port of the revision control system Git. Prior to Git for Windows version 2.39.2, by…
All CVEs affecting Git For Windows Project Git For Windows →
Other CWE-134 vulnerabilities
- CVE-2012-1851 — Critical (CVSS 10.0): Format string vulnerability in the Print Spooler service in Microsoft Windows XP SP2 and SP3, Windows Server 2003 SP2,…
- CVE-2012-0242 — Critical (CVSS 10.0): Format string vulnerability in Advantech/BroadWin WebAccess before 7.0 allows remote attackers to execute arbitrary…
- CVE-2011-2475 — Critical (CVSS 10.0): Format string vulnerability in ECTrace.dll in the iMailGateway service in the Internet Mail Gateway in OneBridge Server…
- CVE-2011-1568 — Critical (CVSS 10.0): Format string vulnerability in the logText function in shmemmgr9.dll in IGSSdataServer.exe 9.00.00.11074, and…
- CVE-2010-4235 — Critical (CVSS 10.0): Format string vulnerability in RealNetworks Helix Server 12.x, 13.x, and 14.x before 14.2, and Helix Mobile Server…
- CVE-2011-0270 — Critical (CVSS 10.0): Format string vulnerability in nnmRptConfig.exe in HP OpenView Network Node Manager (OV NNM) 7.51 and 7.53 allows…