Shell Command Injection Affecting git-ls-remote package, versions <0.2.0


Severity

Recommended
0.0
critical
0
10

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

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 Shell Command Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDnpm:git-ls-remote:20160923
  • published25 Sept 2016
  • disclosed22 Sept 2016
  • creditSnyk Security Research Team

Introduced: 22 Sep 2016

CVE NOT AVAILABLE CWE-78  (opens in a new tab)
First added by Snyk

How to fix?

Upgrade git-ls-remote to version 0.2.0 or higher.

Overview

git-ls-remote is an npm package used for listing references in a remote git repository. Vulnerable versions of the package pass the git url argument to the exec function without sanitisation. An attacker can use this to inject malicious shell commands to disrupt server operation or obtain sensitive information.

Example

var git = require('git-ls-remote');
git.head('https://gitrepo.com/; cat /etc/passwd', function(err, result) {
  // ...
});

CVSS Scores

version 3.1