Command Injection Affecting git-tags-remote package, versions <1.0.3
Exploit Maturity
Proof of concept
Attack Complexity
Low
Privileges Required
High
Confidentiality
High
Integrity
High
Availability
High
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-id
SNYK-JS-GITTAGSREMOTE-596503
-
published
30 Jul 2020
-
disclosed
29 Jul 2020
-
credit
Luis Tangui
Introduced: 29 Jul 2020
CWE-78 Open this link in a new tabHow 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));