CVE-2023-25815
Git looks for localized messages in the wrong place
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:\`.
Fixes and workarounds
Fix
The reporting source identifies this reference as a patch. Check the advisory for affected versions and supported release branches.
Source: [email protected]Fix
The reporting source identifies this reference as a patch. Check the advisory for affected versions and supported release branches.
Source: af854a3a-2127-422b-91ae-364da2661108Affected products and versions
| Product | Versions | Authority |
|---|---|---|
| git git-for-windows |
< 2.40.1 (affected) | CNA: GitHub_M |
Version ranges are source assertions. Check the vendor advisory and your installed configuration before determining exposure.
NVD applicability configurations (2)
These expressions retain AND/OR operators, negation, and required environmental products. A listed product is not sufficient to establish exposure when additional conditions apply.
[
{
"negate": false,
"nodes": [
{
"cpeMatch": [
{
"criteria": "cpe:2.3:a:git_for_windows_project:git_for_windows:*:*:*:*:*:*:*:*",
"versionEndExcluding": "2.40.1",
"vulnerable": true
}
],
"negate": false,
"operator": "OR"
}
],
"operator": "OR"
},
{
"negate": false,
"nodes": [
{
"cpeMatch": [
{
"criteria": "cpe:2.3:o:fedoraproject:fedora:37:*:*:*:*:*:*:*",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:fedoraproject:fedora:38:*:*:*:*:*:*:*",
"vulnerable": true
}
],
"negate": false,
"operator": "OR"
}
],
"operator": "OR"
}
]CVSS assessments
| Version / score | Vector | Authority |
|---|---|---|
| 3.1 / 3.3 low |
CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:N/I:L/A:L | CNA: GitHub_M |
| 3.1 / 2.2 low |
CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:N/I:L/A:N | NVD: [email protected] |
| 3.1 / 3.3 low |
CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:N/I:L/A:L | NVD: [email protected] |
Exploit evidence
No exploit evidence in collected sources. This is not proof of no exploitation.
References
- https://github.com/git-for-windows/git/security/advisories/GHSA-9w66-8mq8-5vm8CNA: GitHub_M · x_refsource_CONFIRM
- https://github.com/msys2/MINGW-packages/pull/10461CNA: GitHub_M · x_refsource_MISC
- https://axcheron.github.io/exploit-101-format-strings/#writing-to-the-stackCNA: GitHub_M · x_refsource_MISC
- https://github.com/git-for-windows/git/releases/tag/v2.40.1.windows.1CNA: GitHub_M · x_refsource_MISC
- https://pubs.opengroup.org/onlinepubs/9699919799/functions/printf.htmlCNA: GitHub_M · x_refsource_MISC
- http://www.openwall.com/lists/oss-security/2023/04/25/2CNA: GitHub_M
- https://lists.fedoraproject.org/archives/list/[email protected]/message/PI7FZ4NNR5S5J5K6AMVQBH2JFP6NE4L7/CNA: GitHub_M
- https://lists.fedoraproject.org/archives/list/[email protected]/message/YFZWGQKB6MM5MNF2DLFTD7KS2KWPICKL/CNA: GitHub_M
- https://lists.fedoraproject.org/archives/list/[email protected]/message/RKOXOAZ42HLXHXTW6JZI4L5DAIYDTYCU/CNA: GitHub_M
- https://security.gentoo.org/glsa/202312-15CNA: GitHub_M
- https://lists.debian.org/debian-lts-announce/2024/06/msg00018.htmlCNA: GitHub_M
- https://github.com/git-for-windows/git/security/advisories/GHSA-9w66-8mq8-5vm8ADP: CVE · x_refsource_CONFIRM, x_transferred
- https://github.com/msys2/MINGW-packages/pull/10461ADP: CVE · x_refsource_MISC, x_transferred
- https://axcheron.github.io/exploit-101-format-strings/#writing-to-the-stackADP: CVE · x_refsource_MISC, x_transferred
- https://github.com/git-for-windows/git/releases/tag/v2.40.1.windows.1ADP: CVE · x_refsource_MISC, x_transferred
- https://pubs.opengroup.org/onlinepubs/9699919799/functions/printf.htmlADP: CVE · x_refsource_MISC, x_transferred
- http://www.openwall.com/lists/oss-security/2023/04/25/2ADP: CVE · x_transferred
- https://lists.fedoraproject.org/archives/list/[email protected]/message/PI7FZ4NNR5S5J5K6AMVQBH2JFP6NE4L7/ADP: CVE · x_transferred
- https://lists.fedoraproject.org/archives/list/[email protected]/message/YFZWGQKB6MM5MNF2DLFTD7KS2KWPICKL/ADP: CVE · x_transferred
- https://lists.fedoraproject.org/archives/list/[email protected]/message/RKOXOAZ42HLXHXTW6JZI4L5DAIYDTYCU/ADP: CVE · x_transferred
- https://security.gentoo.org/glsa/202312-15ADP: CVE · x_transferred
- https://lists.debian.org/debian-lts-announce/2024/06/msg00018.htmlADP: CVE · x_transferred
- https://lists.debian.org/debian-lts-announce/2024/09/msg00009.htmlADP: CVE
- http://www.openwall.com/lists/oss-security/2023/04/25/2[email protected] · Mailing List, Third Party Advisory
- https://axcheron.github.io/exploit-101-format-strings/#writing-to-the-stack[email protected] · Product
- https://github.com/git-for-windows/git/releases/tag/v2.40.1.windows.1[email protected] · Release Notes
- https://github.com/git-for-windows/git/security/advisories/GHSA-9w66-8mq8-5vm8[email protected] · Vendor Advisory
- https://github.com/msys2/MINGW-packages/pull/10461[email protected] · Issue Tracking, Patch
- https://lists.debian.org/debian-lts-announce/2024/06/msg00018.html[email protected]
- https://lists.fedoraproject.org/archives/list/[email protected]/message/PI7FZ4NNR5S5J5K6AMVQBH2JFP6NE4L7/[email protected] · Mailing List, Third Party Advisory
- https://lists.fedoraproject.org/archives/list/[email protected]/message/RKOXOAZ42HLXHXTW6JZI4L5DAIYDTYCU/[email protected]
- https://lists.fedoraproject.org/archives/list/[email protected]/message/YFZWGQKB6MM5MNF2DLFTD7KS2KWPICKL/[email protected] · Mailing List, Third Party Advisory
- https://pubs.opengroup.org/onlinepubs/9699919799/functions/printf.html[email protected] · Product
- https://security.gentoo.org/glsa/202312-15[email protected]
- http://www.openwall.com/lists/oss-security/2023/04/25/2af854a3a-2127-422b-91ae-364da2661108 · Mailing List, Third Party Advisory
- https://axcheron.github.io/exploit-101-format-strings/#writing-to-the-stackaf854a3a-2127-422b-91ae-364da2661108 · Product
- https://github.com/git-for-windows/git/releases/tag/v2.40.1.windows.1af854a3a-2127-422b-91ae-364da2661108 · Release Notes
- https://github.com/git-for-windows/git/security/advisories/GHSA-9w66-8mq8-5vm8af854a3a-2127-422b-91ae-364da2661108 · Vendor Advisory
- https://github.com/msys2/MINGW-packages/pull/10461af854a3a-2127-422b-91ae-364da2661108 · Issue Tracking, Patch
- https://lists.debian.org/debian-lts-announce/2024/06/msg00018.htmlaf854a3a-2127-422b-91ae-364da2661108
- https://lists.debian.org/debian-lts-announce/2024/09/msg00009.htmlaf854a3a-2127-422b-91ae-364da2661108
- https://lists.fedoraproject.org/archives/list/[email protected]/message/PI7FZ4NNR5S5J5K6AMVQBH2JFP6NE4L7/af854a3a-2127-422b-91ae-364da2661108 · Mailing List, Third Party Advisory
- https://lists.fedoraproject.org/archives/list/[email protected]/message/RKOXOAZ42HLXHXTW6JZI4L5DAIYDTYCU/af854a3a-2127-422b-91ae-364da2661108
- https://lists.fedoraproject.org/archives/list/[email protected]/message/YFZWGQKB6MM5MNF2DLFTD7KS2KWPICKL/af854a3a-2127-422b-91ae-364da2661108 · Mailing List, Third Party Advisory
- https://pubs.opengroup.org/onlinepubs/9699919799/functions/printf.htmlaf854a3a-2127-422b-91ae-364da2661108 · Product
- https://security.gentoo.org/glsa/202312-15af854a3a-2127-422b-91ae-364da2661108
For agents and automation
Read public disclosures for free as Markdown or JSON. Compatible browsers also expose native WebMCP tools to search disclosures, read this page, and discover API access.
Use the ontology-linked Cyber API with x402 pay per request, or a Y2 Pro or Elite API key with the intel:cyber scope.
Endpoints and access details
https://api.y2.dev/api/v2/cyber/cveshttps://api.y2.dev/api/v2/cyber/cves/{cveId}
A workspace owner or admin can create a Pro or Elite API key. Send Authorization: Bearer <Y2_API_KEY> from your trusted agent runtime.
For x402, omit Authorization and read the HTTP 402 payment challenge before signing a retry. Public browser tools do not make payments.