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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** LOW 3.3
- **CVSS:** 3.3 (v3.1, CNA) `CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:N/I:L/A:L`
- **CVSS metrics:** Attack vector: Local; Attack complexity: High; Privileges required: Low; User interaction: Required; Scope: Unchanged; Confidentiality impact: None; Integrity impact: Low; Availability impact: Low
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.49% (percentile 35, 2026-11-26)
- **CWE:** CWE-22, CWE-134
- **Published:** 2023-04-25T19:51:38.433Z
- **Modified:** 2026-11-02T23:17:15.373Z

## Who should check

- Anyone running git-for-windows git \< 2.40.1

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

## Affected and fixed versions

- git-for-windows git: \< 2.40.1 (cvelist)

## Mitigation

- Upgrade git to 2.40.1 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2023-25815. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2023-25815.md
Affected: git-for-windows git < 2.40.1
Fixed in: git-for-windows git 2.40.1

Steps:
1. Search this machine and project for git-for-windows git: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2023-25815 being exploited?

There is no confirmed exploitation: CVE-2023-25815 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.49% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2023-25815?

Low: CVSS 3.3 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed). A user has to take an action, such as opening a link, for the attack to work. The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2023-25815?

git-for-windows git \< 2.40.1.

### Is there a fix for CVE-2023-25815?

Yes. Fixed in git-for-windows git 2.40.1. Upgrade git to 2.40.1 or later.

### How do I check if I'm affected by CVE-2023-25815?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/git-for-windows/git/security/advisories/GHSA-9w66-8mq8-5vm8>
- patch: <https://github.com/msys2/MINGW-packages/pull/10461>
- other: <https://axcheron.github.io/exploit-101-format-strings/#writing-to-the-stack>
- other: <https://github.com/git-for-windows/git/releases/tag/v2.40.1.windows.1>
- other: <https://pubs.opengroup.org/onlinepubs/9699919799/functions/printf.html>
- other: <http://www.openwall.com/lists/oss-security/2023/04/25/2>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PI7FZ4NNR5S5J5K6AMVQBH2JFP6NE4L7/>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/YFZWGQKB6MM5MNF2DLFTD7KS2KWPICKL/>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/RKOXOAZ42HLXHXTW6JZI4L5DAIYDTYCU/>
- other: <https://security.gentoo.org/glsa/202312-15>
- other: <https://lists.debian.org/debian-lts-announce/2024/06/msg00018.html>
- other: <https://lists.debian.org/debian-lts-announce/2024/09/msg00009.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2023-25815>

HTML: <https://flawdb.com/CVE-2023-25815> · JSON: <https://flawdb.com/api/v1/entries/CVE-2023-25815>
