logo

GHSA-gm9x-q798-hmr4 git-tags-remote

Package

Manager: npm
Name: git-tags-remote
Vulnerable Version: >=0 <1.0.4

Severity

Level: High

CVSS v3.1: CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H

CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

EPSS: N/A pctlN/A

Details

Command Injection in git-tags-remote 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)); ```

Metadata

Created: 2020-07-29T14:53:40Z
Modified: 2021-09-23T17:26:33Z
Source: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/07/GHSA-gm9x-q798-hmr4/GHSA-gm9x-q798-hmr4.json
CWE IDs: ["CWE-78"]
Alternative ID: N/A
Finding: F404
Auto approve: 1