# GHSA-gm9x-q798-hmr4: Command Injection in git-tags-remote

- Severity: High 7.2 (CVSS:3.1, scored by GitHub) `CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2020-07-29T14:53:40.000Z
- Modified: 2021-09-23T17:26:33.000Z
- Weaknesses: CWE-78

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

(As written by GitHub Advisory Database.)

## Affected

- git-tags-remote (npm): before 1.0.4

## References

- <https://github.com/sh0ji/git-tags-remote/issues/58> (web)
- <https://github.com/sh0ji/git-tags-remote/commit/a20488960cbd2c98455386108253094897ebfc1c> (web)
- <https://github.com/sh0ji/git-tags-remote> (package)
- <https://www.npmjs.com/advisories/1517> (web)

## Sources

- GitHub Advisory Database: [GHSA-gm9x-q798-hmr4](https://github.com/advisories/GHSA-gm9x-q798-hmr4), CC-BY-4.0, modified 2021-09-23

---

Page: https://cve.day/GHSA-gm9x-q798-hmr4 · Whole record: https://cve.day/GHSA-gm9x-q798-hmr4.json · Rebuilt by cve.day 2026-11-25T22:56:45.465Z
