This doesn't even seem like a valid security concern. But I'm open to hearing about some ways that SCP would be vulnerable in ways that SFTP would not. I am by no means an expert in this subject.
LOL
> Intrusion detection systems (IDSs) have a harder problem. Because of their known propensity for false negatives and false positives, IDSs MUST apply a probabilistic correction factor when evaluating the evil bit. If the evil bit is set, a suitable random number generator [RFC1750] must be consulted to determine if the attempt should be logged. Similarly, if the bit is off, another random number generator must be consulted to determine if it should be logged despite the setting.
i am ashamed (or maybe not) to say that i have engaged in this form of debugging during past moments of desperation...
My favorite:
A Standard for the Transmission of IP Datagrams on Avian Carriers
https://tools.ietf.org/html/rfc1149
Check the dates.
We safely connect to evil machines all day long. That's what web browser sandboxes and BitTorrent are for.
We download files from evil machines and use checksums to verify the files.
Presumably by now scp is sufficiently tested not to have this bug. But this is precisely a defense against an evil server sending bad bytes.
The problem is that remote hosts, even ones you think you control, should be assumed potentially evil (compromised).
There's zero reason for a file transfer utility to support running arbitrary commands on the local machine at the remote host's command. That capability shouldn't exist in the protocol, full stop.
But since it does, if you're going to use scp regardless of what we know about it, there's clearly a broad spectrum of risk separating a random VPS in who knows what cloud running who knows what bits vs. the NAS machine in your closet that's only on a wired LAN behind a firewall running nothing that talks to the outside. Probably not the best choice to use scp to copy files to/from the former.