I would like to report a command injection vulnerability in kill-port. It allows an attacker to inject arbitrary commands.
module name: kill-port
version: 1.3.1
npm page: https://www.npmjs.com/package/kill-port
Kill the process running on given port
5,282 downloads in the last week
If an attacker can control the port, which in itself is a very sensitive value, he can inject arbitrary OS commands due to the usage of exec in a third-party module.
const kill = require('kill-port');
kill("23;`touch ./success.txt; 2222222222`");
N/A replace exec (through execa.shell) with spawn
She can inject arbitrary commands. However, I assume that the real impact is not that high, since for most usages of the package I do not expect the user to be able to control the port value.