Git looks for localized messages in the wrong place
Key facts
- Attack vector
- Local
- Privileges required
- Low
- User interaction
- Required
- Attack complexity
- High
- Impact type
- —
- Confidentiality · integrity · availability
- None · Low · Low
- Fix status
- Partial Red Hat: 9 fixed, 2 without a fix
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and Red Hat.
Summary
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:\`.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| git-for-windows | git | before 2.40.1 | 2.40.1 | Patch available | CNA |
- git Vendorgit-for-windows Affected before 2.40.1 Fixed in 2.40.1 Patch available CNA
CPE configurations NVD · 3
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:git_for_windows_project:git_for_windows:*:*:*:*:*:*:*:* | before 2.40.1 | Vulnerable | Git For Windows Project |
| cpe:2.3:o:fedoraproject:fedora:37:*:*:*:*:*:*:* | 37 | Vulnerable | Fedoraproject |
| cpe:2.3:o:fedoraproject:fedora:38:*:*:*:*:*:*:* | 38 | Vulnerable | Fedoraproject |
- cpe:2.3:a:git_for_windows_project:git_for_windows:*:*:*:*:*:*:*:* Versions before 2.40.1 Vulnerable ·Git For Windows Project
- cpe:2.3:o:fedoraproject:fedora:37:*:*:*:*:*:*:* Versions 37 Vulnerable ·Fedoraproject
- cpe:2.3:o:fedoraproject:fedora:38:*:*:*:*:*:*:* Versions 38 Vulnerable ·Fedoraproject
Remediation
- Fix · CNA git (git-for-windows) Fixed in 2.40.1
Red Hat 8 advisories
- RHSA-2023:3382 Released 2023-05-31 · Red Hat rating Importantgit security update
- Red Hat Enterprise Linux AppStream AUS (v. 8.2) git-2.18.4-4.el8_2, git-all-2.18.4-4.el8_2, git-core-2.18.4-4.el8_2 +11
- RHSA-2023:3280 Released 2023-05-23 · Red Hat rating Importantrh-git227-git security update
- Red Hat Software Collections for RHEL Workstation(v. 7) rh-git227-git-2.27.0-6.el7, rh-git227-git-all-2.27.0-6.el7, rh-git227-git-core-2.27.0-6.el7 +14
- Red Hat Software Collections for RHEL(v. 7) rh-git227-git-2.27.0-6.el7, rh-git227-git-all-2.27.0-6.el7, rh-git227-git-core-2.27.0-6.el7 +14
- RHSA-2023:3247 Released 2023-05-22 · Red Hat rating Importantgit security update
- Red Hat Enterprise Linux AppStream EUS (v.8.6) git-2.31.1-4.el8_6, git-all-2.31.1-4.el8_6, git-core-2.31.1-4.el8_6 +12
Show 5 more Red Hat advisories
- RHSA-2023:3246 Released 2023-05-22 · Red Hat rating Importantgit security update
- Red Hat Enterprise Linux AppStream (v. 8) git-2.39.3-1.el8_8, git-all-2.39.3-1.el8_8, git-core-2.39.3-1.el8_8 +12
- RHSA-2023:3245 Released 2023-05-22 · Red Hat rating Importantgit security update
- Red Hat Enterprise Linux AppStream (v. 9) git-2.39.3-1.el9_2, git-all-2.39.3-1.el9_2, git-core-2.39.3-1.el9_2 +12
- RHSA-2023:3248 Released 2023-05-22 · Red Hat rating Importantgit security update
- Red Hat Enterprise Linux AppStream EUS (v.9.0) git-2.31.1-5.el9_0, git-all-2.31.1-5.el9_0, git-core-2.31.1-5.el9_0 +12
- RHSA-2023:3243 Released 2023-05-22 · Red Hat rating Importantgit security update
- Red Hat Enterprise Linux AppStream EUS (v.8.4) git-2.27.0-4.el8_4, git-all-2.27.0-4.el8_4, git-core-2.27.0-4.el8_4 +12
- RHSA-2023:3192 Released 2023-05-17 · Red Hat rating Importantgit security update
- Red Hat Enterprise Linux AppStream E4S (v. 8.1) git-2.18.4-3.el8_1, git-all-2.18.4-3.el8_1, git-core-2.18.4-3.el8_1 +11
Vendor assessments
Red Hat
Red Hat rating: Low. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Enterprise Linux 6 | Affected | No fix planned: Out of support scope |
| Red Hat Enterprise Linux 7 | Affected | No fix planned: Out of support scope |
| Red Hat Enterprise Linux AppStream (v. 8) | Fixed | RHSA-2023:3246 |
| Red Hat Enterprise Linux AppStream (v. 9) | Fixed | RHSA-2023:3245 |
| Red Hat Enterprise Linux AppStream AUS (v. 8.2) | Fixed | RHSA-2023:3382 |
| Red Hat Enterprise Linux AppStream E4S (v. 8.1) | Fixed | RHSA-2023:3192 |
| Red Hat Enterprise Linux AppStream EUS (v.8.4) | Fixed | RHSA-2023:3243 |
| Red Hat Enterprise Linux AppStream EUS (v.8.6) | Fixed | RHSA-2023:3247 |
| Red Hat Enterprise Linux AppStream EUS (v.9.0) | Fixed | RHSA-2023:3248 |
| Red Hat Software Collections for RHEL Workstation(v. 7) | Fixed | RHSA-2023:3280 |
| Red Hat Software Collections for RHEL(v. 7) | Fixed | RHSA-2023:3280 |
Timeline
- 2026-10-02 Threatist record created from CVE-2023-25815
- 2026-11-02 CISA SSVC decision points changed
References
Advisory 4
- https://github.com/git-for-windows/git/security/advisories/GHSA-9w66-8mq8-5vm8
- http://www.openwall.com/lists/oss-security/2023/04/25/2
- https://lists.fedoraproject.org/archives/list/[email protected]/message/PI7FZ4NNR5S5J5K6AMVQBH2JFP6NE4L7/
- https://lists.fedoraproject.org/archives/list/[email protected]/message/YFZWGQKB6MM5MNF2DLFTD7KS2KWPICKL/
Other 6
- 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://pubs.opengroup.org/onlinepubs/9699919799/functions/printf.html
- https://lists.fedoraproject.org/archives/list/[email protected]/message/RKOXOAZ42HLXHXTW6JZI4L5DAIYDTYCU/
- https://security.gentoo.org/glsa/202312-15
- https://lists.debian.org/debian-lts-announce/2024/06/msg00018.html
More git-for-windows vulnerabilities
- TI-2026-44986 Git for Windows: Server-advertised bundle-uri can trigger outbound SMB callbacks via UNC and file:// paths on Windows CVSS 3.1HIGH 7.4
- TI-2025-40849 Git for Windows leaks NTLM hash when cloning from an attacker-controlled server CVSS 3.1HIGH 7.4
- TI-2018-07996 In Git before 2.13.7, 2.14.x before 2.14.4, 2.15.x before 2.15.2, 2.16.x before 2.16.4… CVSS 3.0HIGH 7.8
- TI-2026-85080 Out-of-bounds write in Git for Windows credential helper CVSS 3.1MEDIUM 4.4
- TI-2022-20294 Git clone remote code execution vulnerability in git-for-windows CVSS 3.1HIGH 8.6
- TI-2023-09447 gitk can inadvertently call executables in the worktree CVSS 3.1HIGH 8.6
Sources
- CVE-2023-25815 · CVE Program
- CVE-2023-25815 · NVD
- FIRST EPSS
- CVE-2023-25815 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences