{"id":"GHSA-gm9x-q798-hmr4","aliases":["GHSA-gm9x-q798-hmr4"],"related":[],"kind":"vulnerability","state":"published","title":"Command Injection in git-tags-remote","summary":"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.  \n\nThe following proof-of-concept creates a file in `/tmp`:  \n```\nconst gitTagsRemote = require('git-tags-remote');\n\ngitTagsRemote.get('https://github.com/sh0ji/git-tags-remote.git; echo \"Injection Success\" > /tmp/command-injection.test')\n.then(tags => console.log(tags));\n```","summaryFormat":"markdown","summarySource":"ghsa","descriptions":[{"lang":"en","text":"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.  \n\nThe following proof-of-concept creates a file in `/tmp`:  \n```\nconst gitTagsRemote = require('git-tags-remote');\n\ngitTagsRemote.get('https://github.com/sh0ji/git-tags-remote.git; echo \"Injection Success\" > /tmp/command-injection.test')\n.then(tags => console.log(tags));\n```","format":"markdown","source":"ghsa"}],"published":"2020-07-29T14:53:40.000Z","modified":"2021-09-23T17:26:33.000Z","severity":{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H","score":7.2,"rating":"HIGH"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H","score":7.2,"rating":"HIGH"}],"cwes":["CWE-78"],"affected":[{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.0.4"}],"ecosystem":"npm","package":"git-tags-remote","purl":"pkg:npm/git-tags-remote","source":"ghsa"}],"references":[{"url":"https://github.com/sh0ji/git-tags-remote/issues/58","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/sh0ji/git-tags-remote/commit/a20488960cbd2c98455386108253094897ebfc1c","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/sh0ji/git-tags-remote","tags":["package"],"sources":["ghsa"]},{"url":"https://www.npmjs.com/advisories/1517","tags":["web"],"sources":["ghsa"]}],"credits":[],"sources":[{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-gm9x-q798-hmr4","url":"https://github.com/advisories/GHSA-gm9x-q798-hmr4","licence":"CC-BY-4.0","modified":"2021-09-23T17:26:33.000Z"}],"updatedAt":"2026-11-25T22:56:45.465Z"}