Uncontrolled Search Path Element Affecting git-for-windows/git package, versions [,2.40.1]


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.08% (25th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-UNMANAGED-GITFORWINDOWSGIT-5462126
  • published26 Apr 2023
  • disclosed26 Apr 2023
  • creditycdxsb

Introduced: 26 Apr 2023

CVE-2023-29011  (opens in a new tab)
CWE-427  (opens in a new tab)

How to fix?

Upgrade git-for-windows/git to version or higher.

Overview

Affected versions of this package are vulnerable to Uncontrolled Search Path Element such that the location of connect.exe's config file is hard-coded as /etc/connectrc which will typically be interpreted as C:\etc\connectrc. Since C:\etc can be created by any authenticated user, this makes connect.exe susceptible to malicious files being placed there by other users on the same multi-user machine.

Workaround

Users who are unable to upgrade to the fixed version can create the folder etc on all drives where Git commands are run, and remove read/write access from those folders. Alternatively, users should watch out for malicious <drive>:\etc\connectrc files on multi-user machines.

References

CVSS Base Scores

version 3.1