asyncssh is vulnerable to Path Traversal
65
Medium Risk
SFTPClient._copy() in asyncssh/sftp.py joins each server supplied filename from an SFTP readdir response onto the local destination directory, checking only for exact . and .. names. A malicious or compromised SFTP server can return an absolute path or a filename containing ../ during a recursive get(), mget(), or copy(), so the client writes the file outside the requested destination directory. This SFTP recursive copy logic has no filename guard from the earlier SCP path traversal fix. The patch checks server supplied filenames before joining them onto the local destination path.
You are affected if you are using a version that falls within the vulnerable range and you use SFTPClient.get(), mget(), or copy() to recursively download from an untrusted or compromised SFTP server.
asyncssh is vulnerable to Path Traversal in versions 0.0.1 - 2.24.0.
Upgrade the asyncssh library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.