Path Traversal Affecting git/git package, versions [,2.39.4)[2.40.0,2.40.2)[2.41.0,2.41.1)[2.42.0,2.42.2)[2.43.0,2.43.4)[2.44.0,2.44.1)[2.45.0,2.45.1)


Severity

Recommended
0.0
critical
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.15% (53rd 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 Learn

Learn about Path Traversal vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-UNMANAGED-GITGIT-6841704
  • published15 May 2024
  • disclosed14 May 2024
  • creditfilip-hejsek

Introduced: 14 May 2024

CVE-2024-32002  (opens in a new tab)
CWE-22  (opens in a new tab)

How to fix?

Upgrade git/git to version 2.39.4, 2.40.2, 2.41.1, 2.42.2, 2.43.4, 2.44.1, 2.45.1 or higher.

Overview

Affected versions of this package are vulnerable to Path Traversal through the submodule's worktree configuration. An attacker can execute arbitrary code by crafting a malicious repository that writes a hook into the .git/ directory, which then executes during the clone operation without giving the user the opportunity to inspect the code.

Note:

This is only exploitable if symbolic link support is enabled (e.g., not set to false via git config --global core.symlinks false).

Workaround

This vulnerability can be mitigated by avoiding cloning repositories from untrusted sources.

References

CVSS Scores

version 3.1