LowGO-2021-0073CVE-2017-17831GHSA-w4xh-w33p-4v29

Arbitrary command execution in github.com/git-lfs/git-lfs

Published 14 Apr 2021 · Updated 3 Jun 2024

Is your project on an affected github.com/git-lfs/git-lfs?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Go apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Affected package

Affected
<2.1.1-0.20170519163204-f913f5f9c7c6+incompatible
Fixed in
2.1.1-0.20170519163204-f913f5f9c7c6+incompatible
Update to the fixed version for your release line, for example:go get github.com/git-lfs/git-lfs@v2.1.1-0.20170519163204-f913f5f9c7c6+incompatible

Details

Arbitrary command execution can be triggered by improperly sanitized SSH URLs in LFS configuration files. This can be triggered by cloning a malicious repository.

Is GO-2021-0073 in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected github.com/git-lfs/git-lfs, and gives you the command that fixes it.

More advisories for github.com/git-lfs/git-lfs

  • LowCVE-2025-26625Git LFS may write to arbitrary files via crafted symlinks in github.com/git-lfs/git-lfs · 30 Oct 2025
  • HighCVE-2025-26625Git LFS may write to arbitrary files via crafted symlinks · 17 Oct 2025
  • LowCVE-2024-53263Git LFS permits exfiltration of credentials via crafted HTTP URLs in github.com/git-lfs/git-lfs · 15 Jan 2025
  • HighCVE-2024-53263Git LFS permits exfiltration of credentials via crafted HTTP URLs · 14 Jan 2025
  • CriticalCVE-2022-24826Git LFS can execute a binary from the current directory on Windows · 22 Apr 2022
  • HighCVE-2021-21237Git LFS can execute a Git binary from the current directory on Windows · 15 Feb 2022
All 9 advisories for github.com/git-lfs/git-lfs

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.