| Summary: | Arbitrary command execution using SCP | ||
|---|---|---|---|
| Product: | Portable OpenSSH | Reporter: | Vitja Makarov <vitja.makarov> |
| Component: | scp | Assignee: | Assigned to nobody <unassigned-bugs> |
| Status: | CLOSED WONTFIX | ||
| Severity: | security | CC: | djm, dtucker, vitja.makarov |
| Priority: | P2 | ||
| Version: | 5.8p1 | ||
| Hardware: | All | ||
| OS: | Linux | ||
|
Description
Vitja Makarov
2012-04-18 07:12:23 AEST
the client side scp can't escape the filenames because it does not know what shell is on the other end or what its quoting rules are (and "fixing" this on the client side doesn't help security anyway). the command gets run by the remote shell regardless of what the remote scp does (you can delete scp from the remote side entirely and it'll still happen). If you want to prevent this, you need to enforce it in the remote shell eg with a restricted shell of some type (scponly and rssh are example I'm aware of, but I can't vouch for them). Like Darren said, this is an unfixable limitation of scp. If you need file-transfer that doesn't require shell access then use ForceCommand and sftp Set all RESOLVED bugs to CLOSED with release of OpenSSH 7.1 |