Security Resilience

CVE-2023-25815

Path Traversal in Git For Windows Project Git For Windows ≤ 2.40.1

Published
25 April 2023
Modified
02 November 2026
Patch / advisory
CVSS Score v3.1 3.3
Click a component to see what it means
Raw vectorCVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:N/I:L/A:L
EPSS Score 0.0084 59th percentile
Risk Priority 31 floored blend · peak EPSS

CVSS and EPSS are reproduced from their sources (NVD, FIRST EPSS). EPSS, Forum of Incident Response and Security Teams (FIRST), epss.first.org. Risk Priority is our own derived reading, not an NVD score.

Summary

CVE-2023-25815 is a low-severity Path Traversal (CWE-22) vulnerability in Git For Windows Project Git For Windows. Its CVSS base score is 3.3 (Low).

Operationally, exploitation aligns with the MITRE ATT&CK technique /etc/passwd and /etc/shadow (T1003.008); ranked in the top 41% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

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…

more

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

CWE(s)

Related Threats

MITRE ATT&CK Enterprise Techniques

MITRE ATT&CK v20.0

T1003.008 /etc/passwd and /etc/shadow Credential Access
Adversaries may attempt to dump the contents of <code>/etc/passwd</code> and <code>/etc/shadow</code> to enable offline password cracking.
T1087 Account Discovery Discovery
Adversaries may attempt to get a listing of valid accounts, usernames, or email addresses on a system or within a compromised environment.
T1190 Exploit Public-Facing Application Initial Access
Adversaries may attempt to exploit a weakness in an Internet-facing host or system to initially access a network.
T1203 Exploitation for Client Execution Execution
Adversaries may exploit software vulnerabilities in client applications to execute code.
T1210 Exploitation of Remote Services Lateral Movement
Adversaries may exploit remote services to gain unauthorized access to internal systems once inside of a network.
T1499 Endpoint Denial of Service Impact
Adversaries may perform Endpoint Denial of Service (DoS) attacks to degrade or block the availability of services to users.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2024-23334Shared CWE-22
CVE-2023-32004Shared CWE-22
CVE-2023-40587Shared CWE-22
CVE-2023-32003Shared CWE-22
CVE-2024-25711Shared CWE-22
CVE-2023-39332Shared CWE-22
CVE-2023-25652Shared CWE-22
CVE-2024-32465Shared CWE-22
CVE-2023-38633Shared CWE-22
CVE-2021-25282Shared CWE-22

Affected Assets

git for windows project
git for windows
≤ 2.40.1
fedoraproject
fedora
37, 38

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)

—

Detect
Catch it (NIST detect / respond)

—

Harden
Shrink the surface (DISA STIG)

—

Validate
Prove the fix (OWASP ASVS)
  • V5.3.2

Likely Mitigating Controls

Our mappings. Per-CVE control mapping for this CVE has not run yet; the list below is derived from the weakness types (CWEs) cited in the NVD entry.

addresses: CWE-22

Validates pathnames and filenames to prevent traversal outside intended directories.

Mitigating Controls (NIST CSF 2.0)

Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→CSF cross-walk — links open the control.

PR.PS-06 mostly match
blocks

Secure SDLC practices directly prevent external format strings via code review, static analysis, and safe APIs.

ID.RA-01 partial match
blocks

Vulnerability identification can discover existing format-string flaws but does not prevent their introduction.

PR.PS-02 partial match
blocks

Patching/maintenance can remediate known path-traversal flaws in deployed software (partial prevention of exploitability) but does nothing to stop the coding defect from being introduced in the first place.

Mitigating Controls (ISO/IEC 27001:2022 Annex A)

Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→ISO cross-walk — links open the control.

finds

Security testing in development catches path traversal via static/dynamic analysis.

prevents

Training developers about format string risks prevents some instances where the defect arises from a knowledge gap (e.g., writing printf(input) instead of printf("%s", input)), but the practice is fallible and a different control (A.8.29 security testing) carries the stronger effect, matching the A.8.28 -> CWE-502 and A.8.28 -> CWE-79 anchors.

prevents

Secure coding standards explicitly forbid unsafe path construction and mandate safe APIs.

prevents

A.8.30's contractual requirement for secure design, coding and testing practices (item b, referencing 8.25–8.29) reaches the implementation defect that introduces CWE-134, but the mechanism is requiring a practice through contract — fallible, like A.8.28's grade of `partial` on CWE-502 and CWE-79 — so it moves a minority of instances rather than the bulk.

finds

A.8.8's reach is DISCLOSURE — it sees only instances that carry a vendor-published flaw. Path traversal commonly surfaces as CVEs in third-party components (many examples in the CWE-22 record), so A.8.8 finds that disclosed share; first-party path-traversal defects in the organization's own code are invisible to vulnerability scanning and management, which is the same remainder that caps A.8.8 -> CWE-89 at `partial`.

References