# CVE-2023-25815: Git looks for localized messages in the wrong place

Status: published. Published: 2023-04-25. Updated: 2026-11-02.

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

## Remediation

- fix: The reporting source identifies this reference as a patch. Check the advisory for affected versions and supported release branches. (source: security-advisories@github.com) — https://github.com/msys2/MINGW-packages/pull/10461
- 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-364da2661108) — https://github.com/msys2/MINGW-packages/pull/10461

## Affected products and versions

- git-for-windows / git: < 2.40.1 (affected). Source: CNA: GitHub_M

## NVD configuration conditions

Affected CPE matches depend on the following AND/OR and negation conditions:

```json
[
  {
    "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"
  }
]
```

## Severity and prioritization

- CVSS 3.1: 3.3 (low); CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:N/I:L/A:L; source: CNA: GitHub_M

- CVSS 3.1: 2.2 (low); CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:N/I:L/A:N; source: NVD: nvd@nist.gov

- CVSS 3.1: 3.3 (low); CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:N/I:L/A:L; source: NVD: security-advisories@github.com

- CISA KEV: No listing in collected sources

- EPSS: 0.84% as of 2026-11-02; percentile 57.83%

- SSVC: exploitation none; automatable no; technical impact partial; source ADP: CISA-ADP

- Weaknesses: CWE-22, CWE-134

## 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-5vm8 (CNA: GitHub_M; x_refsource_CONFIRM)

- https://github.com/msys2/MINGW-packages/pull/10461 (CNA: GitHub_M; x_refsource_MISC)

- https://axcheron.github.io/exploit-101-format-strings/#writing-to-the-stack (CNA: GitHub_M; x_refsource_MISC)

- https://github.com/git-for-windows/git/releases/tag/v2.40.1.windows.1 (CNA: GitHub_M; x_refsource_MISC)

- https://pubs.opengroup.org/onlinepubs/9699919799/functions/printf.html (CNA: GitHub_M; x_refsource_MISC)

- http://www.openwall.com/lists/oss-security/2023/04/25/2 (CNA: GitHub_M)

- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PI7FZ4NNR5S5J5K6AMVQBH2JFP6NE4L7/ (CNA: GitHub_M)

- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/YFZWGQKB6MM5MNF2DLFTD7KS2KWPICKL/ (CNA: GitHub_M)

- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/RKOXOAZ42HLXHXTW6JZI4L5DAIYDTYCU/ (CNA: GitHub_M)

- https://security.gentoo.org/glsa/202312-15 (CNA: GitHub_M)

- https://lists.debian.org/debian-lts-announce/2024/06/msg00018.html (CNA: GitHub_M)

- https://github.com/git-for-windows/git/security/advisories/GHSA-9w66-8mq8-5vm8 (ADP: CVE; x_refsource_CONFIRM, x_transferred)

- https://github.com/msys2/MINGW-packages/pull/10461 (ADP: CVE; x_refsource_MISC, x_transferred)

- https://axcheron.github.io/exploit-101-format-strings/#writing-to-the-stack (ADP: CVE; x_refsource_MISC, x_transferred)

- https://github.com/git-for-windows/git/releases/tag/v2.40.1.windows.1 (ADP: CVE; x_refsource_MISC, x_transferred)

- https://pubs.opengroup.org/onlinepubs/9699919799/functions/printf.html (ADP: CVE; x_refsource_MISC, x_transferred)

- http://www.openwall.com/lists/oss-security/2023/04/25/2 (ADP: CVE; x_transferred)

- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PI7FZ4NNR5S5J5K6AMVQBH2JFP6NE4L7/ (ADP: CVE; x_transferred)

- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/YFZWGQKB6MM5MNF2DLFTD7KS2KWPICKL/ (ADP: CVE; x_transferred)

- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/RKOXOAZ42HLXHXTW6JZI4L5DAIYDTYCU/ (ADP: CVE; x_transferred)

- https://security.gentoo.org/glsa/202312-15 (ADP: CVE; x_transferred)

- https://lists.debian.org/debian-lts-announce/2024/06/msg00018.html (ADP: CVE; x_transferred)

- https://lists.debian.org/debian-lts-announce/2024/09/msg00009.html (ADP: CVE)

- http://www.openwall.com/lists/oss-security/2023/04/25/2 (security-advisories@github.com; Mailing List, Third Party Advisory)

- https://axcheron.github.io/exploit-101-format-strings/#writing-to-the-stack (security-advisories@github.com; Product)

- https://github.com/git-for-windows/git/releases/tag/v2.40.1.windows.1 (security-advisories@github.com; Release Notes)

- https://github.com/git-for-windows/git/security/advisories/GHSA-9w66-8mq8-5vm8 (security-advisories@github.com; Vendor Advisory)

- https://github.com/msys2/MINGW-packages/pull/10461 (security-advisories@github.com; Issue Tracking, Patch)

- https://lists.debian.org/debian-lts-announce/2024/06/msg00018.html (security-advisories@github.com)

- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PI7FZ4NNR5S5J5K6AMVQBH2JFP6NE4L7/ (security-advisories@github.com; Mailing List, Third Party Advisory)

- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/RKOXOAZ42HLXHXTW6JZI4L5DAIYDTYCU/ (security-advisories@github.com)

- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/YFZWGQKB6MM5MNF2DLFTD7KS2KWPICKL/ (security-advisories@github.com; Mailing List, Third Party Advisory)

- https://pubs.opengroup.org/onlinepubs/9699919799/functions/printf.html (security-advisories@github.com; Product)

- https://security.gentoo.org/glsa/202312-15 (security-advisories@github.com)

- http://www.openwall.com/lists/oss-security/2023/04/25/2 (af854a3a-2127-422b-91ae-364da2661108; Mailing List, Third Party Advisory)

- https://axcheron.github.io/exploit-101-format-strings/#writing-to-the-stack (af854a3a-2127-422b-91ae-364da2661108; Product)

- https://github.com/git-for-windows/git/releases/tag/v2.40.1.windows.1 (af854a3a-2127-422b-91ae-364da2661108; Release Notes)

- https://github.com/git-for-windows/git/security/advisories/GHSA-9w66-8mq8-5vm8 (af854a3a-2127-422b-91ae-364da2661108; Vendor Advisory)

- https://github.com/msys2/MINGW-packages/pull/10461 (af854a3a-2127-422b-91ae-364da2661108; Issue Tracking, Patch)

- https://lists.debian.org/debian-lts-announce/2024/06/msg00018.html (af854a3a-2127-422b-91ae-364da2661108)

- https://lists.debian.org/debian-lts-announce/2024/09/msg00009.html (af854a3a-2127-422b-91ae-364da2661108)

- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PI7FZ4NNR5S5J5K6AMVQBH2JFP6NE4L7/ (af854a3a-2127-422b-91ae-364da2661108; Mailing List, Third Party Advisory)

- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/RKOXOAZ42HLXHXTW6JZI4L5DAIYDTYCU/ (af854a3a-2127-422b-91ae-364da2661108)

- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/YFZWGQKB6MM5MNF2DLFTD7KS2KWPICKL/ (af854a3a-2127-422b-91ae-364da2661108; Mailing List, Third Party Advisory)

- https://pubs.opengroup.org/onlinepubs/9699919799/functions/printf.html (af854a3a-2127-422b-91ae-364da2661108; Product)

- https://security.gentoo.org/glsa/202312-15 (af854a3a-2127-422b-91ae-364da2661108)

## Provenance

- CNA: GitHub_M: https://www.cve.org/CVERecord?id=CVE-2023-25815; retrieved 2026-11-02; source updated 2026-11-02

- NVD: https://nvd.nist.gov/vuln/detail/CVE-2023-25815; retrieved 2026-11-03; source updated 2026-11-02

- FIRST EPSS: https://api.first.org/data/v1/epss?cve=CVE-2023-25815; retrieved 2026-11-02; source updated Not reported

Revision: 6d7ccad776e72380cb21e5d5b39424455d186276fee98b19bdeb54424301c49c

Canonical: https://y2.dev/cve/CVE-2023-25815

## Agent and API access

Public CVE pages, Markdown, and JSON are free to read without an account or API key.

- Public catalog: https://y2.dev/cve/index.json. Follow nextCursor with the same search, filters, sort, and limit (1–100). A null cursor marks the end.

- WebMCP: search_cve_disclosures, get_cve_disclosure, get_cve_page_markdown, get_y2_cve_access. Available in compatible browsers.

- Cyber API: https://api.y2.dev/api/v2/cyber/cves and https://api.y2.dev/api/v2/cyber/cves/{cveId}.

- Y2 Pro or Elite: create a workspace API key with the intel:cyber scope and send Authorization: Bearer <Y2_API_KEY>. Setup: https://y2.dev/docs/api/create-key.

- x402: Pay per request without an account or API key. Omit Authorization, read the HTTP 402 PAYMENT-REQUIRED challenge, validate its current requirements, and retry with PAYMENT-SIGNATURE through an authorized payment client. These browser tools never make payments. Guide: https://y2.dev/docs/api/x402.

- OpenAPI: https://y2.dev/api/openapi.yaml. Agent access metadata: https://y2.dev/cve/agent.json.

Collected public records only. Check source status for coverage and freshness.