Arbitrary Code Execution Affecting github.com/git-lfs/git-lfs/lfs package, versions <2.13.2


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team

    Threat Intelligence

    EPSS
    0.05% (22nd 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 ID SNYK-GOLANG-GITHUBCOMGITLFSGITLFSLFS-1061935
  • published 18 Jan 2021
  • disclosed 18 Jan 2021
  • credit Ry0taK

How to fix?

Upgrade github.com/git-lfs/git-lfs/lfs to version 2.13.2 or higher.

Overview

Affected versions of this package are vulnerable to Arbitrary Code Execution. This security problem does not affect Unix systems.

On Windows, if Git LFS operates on a malicious repository with a git.bat or git.exe file in the current directory, that program is executed, permitting the attacker to execute arbitrary code. This occurs because on Windows, Go includes (and prefers) the current directory when the name of a command run does not contain a directory separator.

Other than avoiding untrusted repositories or using a different operating system, there is no workaround.

This is the same issue as CVE-2020-27955, but the fix for that issue was incomplete and certain options can still cause the problem to occur.

CVSS Scores

version 3.1
Expand this section

Snyk

Recommended
7.3 high
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    Low
  • Privileges Required (PR)
    None
  • User Interaction (UI)
    None
  • Scope (S)
    Unchanged
  • Confidentiality (C)
    Low
  • Integrity (I)
    Low
  • Availability (A)
    Low
Expand this section

NVD

7.8 high