OSV 1.4.0 · github-reviewed · 修改于 2021-09-24 01:26
发布时间
2020-07-29 22:53
GitHub 审查时间
2020-07-29 22:52
NVD 发布时间
—
源文件
advisories/github-reviewed/2020/07/GHSA-gm9x-q798-hmr4/GHSA-gm9x-q798-hmr4.json
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));