git-tags-remote@1.0.1 vulnerabilities

Get remote repository tags.

Direct Vulnerabilities

Known vulnerabilities in the git-tags-remote package. This does not include vulnerabilities belonging to this package’s dependencies.

Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.
Fix for free
Vulnerability Vulnerable Version
  • H
Command Injection

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));

How to fix Command Injection?

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

<1.0.3