CVE-2017-17831: GitHub Git LFS Improper Input Validation vulnerability

github.com/git-lfs/git-lfs Updated 02 Oct 2025

Summary

14/05/2022
Yes i
High
8.8

CVE-2017-17831: GitHub Git LFS Arbitrary command execution vulnerability. Affects github.com/git-lfs/git-lfs versions < 2.1.1-0.20170519163204-f913f5f9c7c6. Fixed in 2.1.1-0.20170519163204-f913f5f9c7c6. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

GitHub Git LFS is a tool that allows large files to be stored in a Git repository by replacing them with text pointers. It is written in Go and provides an extension for Git. The vulnerability in question affects versions of GitHub Git LFS prior to 2.1.1. This vulnerability allows remote attackers to execute arbitrary commands by exploiting improper input validation. Specifically, an attacker can use an ssh URL with an initial dash character in the hostname, which is located on a url = line in a .lfsconfig file within a repository.

Vulnerability Detail

The vulnerability arises from a lack of proper input validation in GitHub Git LFS. By crafting a malicious ssh URL with an initial dash character in the hostname, an attacker can trick the system into executing arbitrary commands. This can lead to various consequences, including unauthorized access, data manipulation, and remote code execution. The vulnerability has a CVSS score of 8.8, indicating a high severity level.

How To Fix

Latest published version: v2.5.2+incompatible as of 23 Oct 2026

go get github.com/git-lfs/git-lfs@v2.5.2+incompatible

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.1.1-0.20170519163204-f913f5f9c7c6

This is the first release that contains the fix.

go get github.com/git-lfs/git-lfs@v2.1.1-0.20170519163204-f913f5f9c7c6

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no known workaround for this vulnerability. It is crucial to update to the fixed version as soon as possible to mitigate the risk of exploitation.

Conclusion

The GitHub Git LFS Improper Input Validation vulnerability (CVE-2017-17831) allows remote attackers to execute arbitrary commands. It is crucial to update GitHub Git LFS to version 2.1.1 or later to mitigate the risk of exploitation. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for github.com/git-lfs/git-lfs →

Share this vulnerability

FAQ

GitHub Git LFS is a tool that allows large files to be stored in a Git repository by replacing them with text pointers.

This vulnerability allows remote attackers to execute arbitrary commands, potentially leading to unauthorized access, data manipulation, and remote code execution.

To fix this vulnerability, update GitHub Git LFS to version 2.1.1 or later by following the official documentation.

No, there is no known workaround. It is essential to update to the fixed version.

The CVSS score of this vulnerability is 8.8, indicating a high severity level.

Related vulnerabilities

Recent vulnerabilities recorded for github.com/git-lfs/git-lfs.

How To Fix

Latest published version: v2.5.2+incompatible as of 23 Oct 2026

go get github.com/git-lfs/git-lfs@v2.5.2+incompatible

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.1.1-0.20170519163204-f913f5f9c7c6

This is the first release that contains the fix.

go get github.com/git-lfs/git-lfs@v2.1.1-0.20170519163204-f913f5f9c7c6

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback