{"id":"GHSA-gm9x-q798-hmr4","aliases":[],"status":"published","title":"Command Injection in git-tags-remote","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.  \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```","severity":{"version":"3.1","score":7.2,"vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H","level":"high","from":"ghsa"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-78"],"published":"2020-07-29T14:53:40Z","modified":"2023-01-09T05:03:40Z","fixes":[{"ecosystem":"npm","package":"git-tags-remote","fixed_in":["1.0.4"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"git-tags-remote","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.0.4"}]}]},{"source":"osv","ecosystem":"npm","package":"git-tags-remote","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.0.4"}]}]}],"references":[{"url":"https://www.npmjs.com/advisories/1517","tags":["web"]},{"url":"https://github.com/sh0ji/git-tags-remote/issues/58","tags":["web"]},{"url":"https://github.com/sh0ji/git-tags-remote/commit/a20488960cbd2c98455386108253094897ebfc1c","tags":["web"]},{"url":"https://github.com/advisories/GHSA-gm9x-q798-hmr4"},{"url":"https://github.com/sh0ji/git-tags-remote","tags":["package"]}],"sources":{"ghsa":[{"id":"GHSA-gm9x-q798-hmr4","title":"Command Injection in git-tags-remote","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.  \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```","status":"published","published":"2020-07-29T14:53:40Z","modified":"2023-01-09T05:03:40Z","cvss":[{"version":"3.1","score":7.2,"vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-78"],"updated_at":"2026-11-02T14:36:05.705235Z"}],"osv":[{"id":"GHSA-gm9x-q798-hmr4","title":"Command Injection in git-tags-remote","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.  \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```","status":"published","published":"2020-07-29T14:53:40Z","modified":"2021-09-23T17:26:33Z","cvss":[{"version":"3.1","score":7.2,"vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-78"],"updated_at":"2026-11-02T15:46:47.822182Z"}]}}
