Command Injection Affecting git-tags-remote package, versions <1.0.3


Severity

Recommended
0.0
high
0
10

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

Threat Intelligence

Exploit Maturity
Proof of concept

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

Start learning
  • Snyk IDSNYK-JS-GITTAGSREMOTE-596503
  • published30 Jul 2020
  • disclosed29 Jul 2020
  • creditLuis Tangui

Introduced: 29 Jul 2020

CVE NOT AVAILABLE CWE-78  (opens in a new tab)

How to fix?

Upgrade git-tags-remote to version 1.0.3 or higher.

Overview

git-tags-remote is a Get remote repository tags.

Affected versions of this package are vulnerable to Command Injection. The package fails to sanitize the repository input and passes it directly to an exec call on the get function . This may allow attackers to execute arbitrary code in the system if the repo value passed to the function is user-controlled.

PoC

const gitTagsRemote = require('git-tags-remote'); 
gitTagsRemote.get('https://github.com/sh0ji/git-tags-remote.git; echo "Injection Success" > /tmp/command-injection.test') .then(tags => console.log(tags));

CVSS Scores

version 3.1