This affects all versions of package ps-kill. If (attacker-controlled) user input is given to the kill function, it is possible for an attacker to execute arbitrary commands. This is due to use of the child_process exec function without input sanitization in the index.js file.
PoC (provided by reporter):
var ps_kill = require('ps-kill');
ps_kill.kill('$(touch success)', function() {});
{
"cwe_ids": [
"CWE-77"
],
"github_reviewed": true,
"github_reviewed_at": "2021-03-16T22:05:22Z",
"nvd_published_at": "2021-03-15T17:15:00Z",
"severity": "CRITICAL"
}