Skip to content
Fencer Vulns
low 3.3

CVE-2023-25815 json

Git looks for localized messages in the wrong place

published 2023-04-25 3 y ago modified 2026-11-02 6 d ago also EUVD-2023-29707

cvss
3.3
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.8%
EPSS 0.8% chance of exploitation in 30 days, percentile 58%
public exploits
0
none known

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

Patch / fix

  • git_for_windows_project git_for_windows 2.40.1.1
  • gitforwindows git 2.40.1.1
  • git Debian 12 1:2.39.5-0+deb12u1
  • git Debian 14, Debian 13 1:2.40.1-1

debian advisories DEBIAN-CVE-2023-25815

  • git Ubuntu 18.04 LTS 1:2.17.1-1ubuntu0.18
  • git Ubuntu 20.04 LTS 1:2.25.1-1ubuntu3.11
  • git Ubuntu 22.04 LTS 1:2.34.1-1ubuntu1.9
  • git Ubuntu Pro 16.04 LTS 1:2.7.4-0ubuntu1.10+esm8

ubuntu advisories UBUNTU-CVE-2023-25815

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • git RHEL 9 2.39.3-1.el9_2
  • gitk RHEL 9 2.39.3-1.el9_2
  • gitweb RHEL 9 2.39.3-1.el9_2
  • git-all RHEL 9 2.39.3-1.el9_2
  • git-gui RHEL 9 2.39.3-1.el9_2
  • git-svn RHEL 9 2.39.3-1.el9_2
  • git-core RHEL 9 2.39.3-1.el9_2
  • perl-Git RHEL 9 2.39.3-1.el9_2

red hat advisories RHSA-2023:3245RHSA-2023:3246RHSA-2023:3243RHSA-2023:3192RHSA-2023:3280RHSA-2023:3382

  • git SLE Real Time 15 SP3, SLE Module for Development Tools 15 SP4, SLE Module for Basesystem 15 SP4 +8 more 2.35.3-150300.10.27.1
  • git SLES for SAP 15 SP2, SLES for SAP 15 SP1, SLES 15 SP2-LTSS +4 more 2.26.2-150000.50.1
  • git SLES for SAP 12 SP5, SLES for SAP 12 SP4, SLES 12 SP5 +8 more 2.26.2-27.69.1

suse advisories SUSE-SU-2023:2038-2SUSE-SU-2023:2081-1SUSE-SU-2023:2062-1SUSE-SU-2023:2038-1

  • git openSUSE Tumbleweed 2.40.1-1.1

opensuse advisories openSUSE-SU-2024:12889-1

  • git AlmaLinux 9 2.39.3-1.el9_2
  • gitk AlmaLinux 9 2.39.3-1.el9_2
  • gitweb AlmaLinux 9 2.39.3-1.el9_2
  • git-all AlmaLinux 9 2.39.3-1.el9_2
  • git-gui AlmaLinux 9 2.39.3-1.el9_2
  • git-svn AlmaLinux 9 2.39.3-1.el9_2
  • git-core AlmaLinux 9 2.39.3-1.el9_2
  • perl-Git AlmaLinux 9 2.39.3-1.el9_2

almalinux advisories ALSA-2023:3245ALSA-2023:3246

  • git Rocky Linux 8 2.39.3-1.el8_8

rocky linux advisories RLSA-2023:3246

  • git Alpine 3.14 2.32.7-r0
  • git Alpine 3.15 2.34.8-r0
  • git Alpine 3.16 2.36.6-r0
  • git Alpine 3.17 2.38.5-r0
  • git Alpine 3.24, Alpine 3.23, Alpine 3.22 +4 more 2.40.1-r0

alpine advisories ALPINE-CVE-2023-25815

Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2023-25815 updated cvss 2.2

git: malicious placement of crafted messages when git was compiled with runtime prefix

  • Red Hat Enterprise Linux 6 git, gitk, gitweb, git-all, git-cvs, git-gui, +6 more Red Hat Enterprise Linux 7 git, gitk, git-hg, git-p4, gitweb, git-all, +12 more
    affected: no fix planned “Out of support scope”
  • Red Hat Enterprise Linux AppStream (v. 8) git 2.39.3-1.el8_8, gitk 2.39.3-1.el8_8, gitweb 2.39.3-1.el8_8, git-all 2.39.3-1.el8_8, git-gui 2.39.3-1.el8_8, git-svn 2.39.3-1.el8_8, +8 more
    fixed: vendor fix RHSA-2023:3246
  • Red Hat Enterprise Linux AppStream (v. 9) git 2.39.3-1.el9_2, gitk 2.39.3-1.el9_2, gitweb 2.39.3-1.el9_2, git-all 2.39.3-1.el9_2, git-gui 2.39.3-1.el9_2, git-svn 2.39.3-1.el9_2, +8 more
    fixed: vendor fix RHSA-2023:3245
  • Red Hat Enterprise Linux AppStream AUS (v. 8.2) git 2.18.4-4.el8_2, gitk 2.18.4-4.el8_2, gitweb 2.18.4-4.el8_2, git-all 2.18.4-4.el8_2, git-gui 2.18.4-4.el8_2, git-svn 2.18.4-4.el8_2, +7 more
    fixed: vendor fix RHSA-2023:3382
  • Red Hat Enterprise Linux AppStream E4S (v. 8.1) git 2.18.4-3.el8_1, gitk 2.18.4-3.el8_1, gitweb 2.18.4-3.el8_1, git-all 2.18.4-3.el8_1, git-gui 2.18.4-3.el8_1, git-svn 2.18.4-3.el8_1, +7 more
    fixed: vendor fix RHSA-2023:3192
  • Red Hat Enterprise Linux AppStream EUS (v.8.4) git 2.27.0-4.el8_4, gitk 2.27.0-4.el8_4, gitweb 2.27.0-4.el8_4, git-all 2.27.0-4.el8_4, git-gui 2.27.0-4.el8_4, git-svn 2.27.0-4.el8_4, +8 more
    fixed: vendor fix RHSA-2023:3243
  • Red Hat Enterprise Linux AppStream EUS (v.8.6) git 2.31.1-4.el8_6, gitk 2.31.1-4.el8_6, gitweb 2.31.1-4.el8_6, git-all 2.31.1-4.el8_6, git-gui 2.31.1-4.el8_6, git-svn 2.31.1-4.el8_6, +8 more
    fixed: vendor fix RHSA-2023:3247
  • Red Hat Enterprise Linux AppStream EUS (v.9.0) git 2.31.1-5.el9_0, gitk 2.31.1-5.el9_0, gitweb 2.31.1-5.el9_0, git-all 2.31.1-5.el9_0, git-gui 2.31.1-5.el9_0, git-svn 2.31.1-5.el9_0, +8 more
    fixed: vendor fix RHSA-2023:3248
show 1 more
  • Red Hat Software Collections for RHEL Workstation(v. 7) rh-git227-git 2.27.0-6.el7, rh-git227-gitk 2.27.0-6.el7, rh-git227-git-p4 2.27.0-6.el7, rh-git227-gitweb 2.27.0-6.el7, rh-git227-git-all 2.27.0-6.el7, rh-git227-git-cvs 2.27.0-6.el7, +10 more Red Hat Software Collections for RHEL(v. 7) rh-git227-git 2.27.0-6.el7, rh-git227-gitk 2.27.0-6.el7, rh-git227-git-p4 2.27.0-6.el7, rh-git227-gitweb 2.27.0-6.el7, rh-git227-git-all 2.27.0-6.el7, rh-git227-git-cvs 2.27.0-6.el7, +10 more
    fixed: vendor fix RHSA-2023:3280

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
none
Automatable
no
Technical impact
partial
Assessed
6 d ago

Exploit prediction

0.84% chance of exploitation in the next 30 days, higher than 58% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CNA 3.1 3.3 CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:N/I:L/A:L
NVD 3.1 2.2 CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:N/I:L/A:N

Affected products

  • git-for-windows git

Classification

Weakness
  • CWE-22 Improper Limitation of a Pathname to a Restricted Directory
  • CWE-134 Use of Externally-Controlled Format String

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.

CPEs and fixed versions use Anchore's correction of NVD's data: git for windows improved version ranges, cpes, etc.