Path Traversal Affecting github.com/go-git/go-git/v5 package, versions >=5.0.0 <5.11.0


Severity

Recommended
0.0
critical
0
10

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

Threat Intelligence

EPSS
0.25% (65th 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-GOLANG-GITHUBCOMGOGITGOGITV5-6150754
  • published11 Jan 2024
  • disclosed10 Jan 2024
  • creditIonut Lalu

Introduced: 10 Jan 2024

CVE-2023-49569  (opens in a new tab)
CWE-22  (opens in a new tab)

How to fix?

Upgrade github.com/go-git/go-git/v5 to version 5.11.0 or higher.

Overview

Affected versions of this package are vulnerable to Path Traversal via malicious server replies. An attacker can create and amend files across the filesystem and potentially achieve remote code execution by sending crafted responses to the client.

Notes:

  1. This is only exploitable if the client is using ChrootOS, which is the default for certain functions such as PlainClone.

  2. Applications using BoundOS or in-memory filesystems are not affected by this issue.

  3. Users running versions of go-git from v4 and above are recommended to upgrade to v5.11 in order to mitigate this vulnerability.

Workaround

This vulnerability can be mitigated by limiting the client's use to trustworthy Git servers.

References

CVSS Scores

version 3.1