PAR101

Unquoted inputs to paramiko exec_command() can leave the remote host vulnerable to shell injection.

Applies to :

Notes

Quick Fixes

Fixes

Use shlex.quote surrounding any input, e.g.

import paramiko
import shlex

client = paramiko.SSHClient(...)
ret = client.exec_command(shlex.quote(input))