Vulnerability Details : CVE-2023-25815
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:\`.
Products affected by CVE-2023-25815
- cpe:2.3:o:fedoraproject:fedora:37:*:*:*:*:*:*:*
- cpe:2.3:o:fedoraproject:fedora:38:*:*:*:*:*:*:*
- cpe:2.3:a:git_for_windows_project:git_for_windows:*:*:*:*:*:*:*:*
Exploit prediction scoring system (EPSS) score for CVE-2023-25815
0.09%
Probability of exploitation activity in the next 30 days
EPSS Score History
~ 27 %
Percentile, the proportion of vulnerabilities that are scored at or less
CVSS scores for CVE-2023-25815
Base Score | Base Severity | CVSS Vector | Exploitability Score | Impact Score | Score Source | First Seen |
---|---|---|---|---|---|---|
2.2
|
LOW | CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:N/I:L/A:N |
0.8
|
1.4
|
NIST | |
3.3
|
LOW | CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:N/I:L/A:L |
0.8
|
2.5
|
GitHub, Inc. |
CWE ids for CVE-2023-25815
-
The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.Assigned by: security-advisories@github.com (Primary)
-
The product uses a function that accepts a format string as an argument, but the format string originates from an external source.Assigned by:
- nvd@nist.gov (Secondary)
- security-advisories@github.com (Primary)
References for CVE-2023-25815
-
https://github.com/msys2/MINGW-packages/pull/10461
gettext: update to 0.21 by lazka · Pull Request #10461 · msys2/MINGW-packages · GitHubIssue Tracking;Patch
-
https://github.com/git-for-windows/git/releases/tag/v2.40.1.windows.1
Release Git for Windows 2.40.1 · git-for-windows/git · GitHubRelease Notes
-
https://pubs.opengroup.org/onlinepubs/9699919799/functions/printf.html
fprintfProduct
-
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/YFZWGQKB6MM5MNF2DLFTD7KS2KWPICKL/
[SECURITY] Fedora 37 Update: git-2.40.1-1.fc37 - package-announce - Fedora Mailing-ListsMailing List;Third Party Advisory
-
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/RKOXOAZ42HLXHXTW6JZI4L5DAIYDTYCU/
[SECURITY] Fedora 36 Update: git-2.40.1-1.fc36 - package-announce - Fedora Mailing-Lists
-
https://github.com/git-for-windows/git/security/advisories/GHSA-9w66-8mq8-5vm8
Git looks for localized messages in an unprivileged place · Advisory · git-for-windows/git · GitHubVendor Advisory
-
https://lists.debian.org/debian-lts-announce/2024/06/msg00018.html
[SECURITY] [DLA 3844-1] git security update
-
https://security.gentoo.org/glsa/202312-15
Git: Multiple Vulnerabilities (GLSA 202312-15) — Gentoo security
-
http://www.openwall.com/lists/oss-security/2023/04/25/2
oss-security - [ANNOUNCE] Git v2.40.1 and friendsMailing List;Third Party Advisory
-
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PI7FZ4NNR5S5J5K6AMVQBH2JFP6NE4L7/
[SECURITY] Fedora 38 Update: git-2.40.1-1.fc38 - package-announce - Fedora Mailing-ListsMailing List;Third Party Advisory
-
https://axcheron.github.io/exploit-101-format-strings/#writing-to-the-stack
Exploit 101 - Format Strings - BreakInSecurityProduct
Jump to