GHSA-gm9x-q798-hmr4
JSON

7.2high

Command Injection in git-tags-remote

Severity
7.2high CVSS:3.1 by GitHub
Published
Last changed

Description

All versions of git-tags-remote 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.

The following proof-of-concept creates a file in /tmp:

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

Affected

Product or packageVersionsReported by
git-tags-remote (npm)before 1.0.4GitHub Advisory Database

Classification

References

Sources

SourceRecordLicence
GitHub Advisory DatabaseGHSA-gm9x-q798-hmr4 changed 2021-09-23CC-BY-4.0