Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessVictim initiates recursive SFTP get/copy
-
DeliveryMalicious server returns traversal/absolute filename in readdir
-
Exploitposixpath.join escapes destination directory
-
ExecutionClient writes attacker content to writable location
-
ImpactOverwrite authorized_keys/cron for code execution
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK
2 techniques across 2 tactics: Discovery, Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the victim to perform a recursive remote-to-local SFTP copy - SFTPClient.get(), mget(), or copy() with recurse=True reaching _copy() in asyncssh/sftp.py - against an AsyncSSH version prior to 2.24.1, while connected to an SFTP server the attacker controls or has compromised. The server must return a directory entry (via SSH_FXP_NAME/readdir) whose filename is an absolute path or contains path-separator/'../' traversal sequences. Limiting factors that reduce realistic risk: the attacker must occupy the server side of an established, user-initiated SFTP session (UI:R), the victim must specifically choose a recursive download, and writes are confined to filesystem locations the client process already has permission to modify - the flaw grants no privilege escalation by itself. Non-recursive transfers and connections only to trusted servers are not affected. |
| Impact | This is a medium-severity (CVSS 6.5) client-side path traversal where the threat actor is a malicious or compromised SFTP server, not a remote attacker hitting a listening service. The CVSS vector (AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N) is internally consistent with the mechanism: network vector because the client connects to a remote server, no privileges on the attacker side (the server simply answers readdir), but UI:R because a victim must actively initiate a recursive remote-to-local transfer (get/mget/recurse copy) for the flaw to trigger. Impact is integrity-only (I:H, arbitrary file write); C:N and A:N are appropriate since the primitive is a write, though file overwrite could secondarily affect availability/integrity of overwritten files. Signals partly conflict on urgency: the vendor advisory ships a verified working proof-of-concept (with captured 'PWNED' output), which raises practical risk, but there is no CISA KEV listing and no EPSS score in the provided data, and the vuln.today decision label is 'this_month' (not act_now/emergency). The dominant limiting factor is the required precondition - the victim must already be running a recursive download against a server the attacker controls or has compromised - so this is a real, fixable priority for anyone automating SFTP pulls from untrusted or multi-tenant servers, but not a mass-exploitable internet-facing emergency. Note this is explicitly the SFTP sibling of the earlier SCP fix (CVE-2026-54591); the guard was simply never ported to the SFTP recursive-copy path. |
| Exploit ScenarioDerived | A victim runs an automated or manual recursive SFTP download (e.g. sftp.get(path, dest, recurse=True)) from a server the attacker controls or has compromised. The server's directory enumeration (readdir/SSH_FXP_NAME) returns an entry whose filename is an absolute path or contains '../' sequences; AsyncSSH's _copy() joins it into the destination with no sanitization, writing attacker-chosen content to any location the client process can write - such as ~/.ssh/authorized_keys, a cron directory, or a shell startup file, potentially leading to code execution as the client user. A full working proof-of-concept is published in the vendor's GitHub security advisory and was verified with captured output. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 09, 2026
Path traversal in AsyncSSH's recursive remote-to-local SFTP copy logic (SFTPClient._copy(), reached through get(), mget() and copy() with recurse=True) allows a malicious or compromised SFTP server to plant attacker-chosen files outside the requested local destination directory. Every release prior to 2.24.1 is affected; the server supplies the filename in its readdir/SSH_FXP_NAME response, and posixpath.join either walks up out of the destination with '../' segments or discards the destination entirely when the name is absolute. The CVSS vector (AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N) reflects that the victim must initiate a recursive download from the hostile server, with writes limited to locations the client process can already modify; a public proof-of-concept with a working demonstration script accompanies the advisory, and the issue is not listed in CISA KEV with no confirmed active exploitation at time of analysis.
RemediationAI
Upgrade to AsyncSSH 2.24.1 or later (pip install --upgrade 'asyncssh>=2.24.1'), the version that contains the upstream guard rejecting filenames containing '/' or '\\' with SFTPBadMessage; details are in advisory GHSA-q8m6-9rfx-39rf and release https://github.com/ronf/asyncssh/releases/tag/v2.24.1, with the code change in commit eaf7fd3b058ccb36b51ed932158d36cf304aa7c3. Where upgrading is not immediately possible, the effective compensating control is to stop using recursive remote-to-local copies (get()/mget()/copy() with recurse=True) against servers that are not fully trusted, since non-recursive transfers never reach _copy() and are unaffected - the trade-off is loss of bulk-download convenience for untrusted hosts. Running client processes with the least filesystem privilege the download actually requires narrows the blast radius, because the flaw can only write where the client process already has write access, and the fix's behaviour change should be noted: after upgrading, a recursive copy from any server that returns separators in directory-entry names will fail with SFTPBadMessage rather than silently writing files.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
AsyncSSH is a pure-Python implementation of the SSHv2 protocol (client and server, including SFTP) built on asyncio. SFTP directory listings arrive as SSH_FXP_NAME responses to a readdir request, and each entry carries a filename that is entirely controlled by the remote server. In asyncssh/sftp.py, SFTPClient._copy() iterates srcfs.scandir(srcpath) and constructs the destination as posixpath.join(dstpath, filename) after only skipping entries whose filename is exactly b'.' or b'..'. Because posixpath.join discards the left operand when the right operand is absolute, a server-chosen name such as /home/user/.ssh/authorized_keys is written verbatim, while names containing '/' or '../' sequences escape dstpath after path resolution. The root cause is CWE-22 (Improper Limitation of a Pathname to a Restricted Directory). The advisory notes this is the same defect class as the previously patched SCP traversal (GHSA-2wxc-x7rj-hg8f / CVE-2026-54591): the filename guard added to _parse_cd_args in asyncssh/scp.py was never mirrored in the SFTP recursive-copy path, which remained reachable on the develop branch (commit 312678b, 2026-07-11). The CPE cpe:2.3:a:ronf:asyncssh:*:*:*:*:*:*:*:* identifies the upstream ronf/asyncssh package distributed on PyPI as pip/asyncssh. The upstream fix inserts a check that raises SFTPBadMessage('Invalid filename') whenever the reported filename contains b'/' or b'\\', aborting the transfer before path construction.
Know when Asyncssh gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
Malicious server needs no privileges (PR:N) and the attack is reliable (AC:L), but the victim must initiate a recursive copy (UI:R); impact is arbitrary file write, so I:H with C:N/A:N.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
1DescriptionCVE.org
AsyncSSH is a Python package which provides an asynchronous client and server implementation of the SSHv2 protocol on top of the Python asyncio framework. Prior to 2.24.1, recursive remote-to-local SFTP copies in SFTPClient._copy() in asyncssh/sftp.py, reached through get(), mget(), and copy(), trust filenames returned by a remote server's directory enumeration. A malicious or compromised SFTP server can return an absolute filename or a filename containing path separators and parent-directory traversal, causing destination path construction to escape the requested local directory and write attacker-selected content to locations writable by the client process. This issue is fixed in version 2.24.1.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.
The SSH transport protocol with certain OpenSSH extensions, found in OpenSSH before 9.6 and other products, allows remot
The SSH server implementation of AsyncSSH before 1.12.1 does not properly check whether authentication is completed befo
Chroot escape in AsyncSSH's SFTP server (versions <= 2.24.0) lets an authenticated SFTP user read and write files outsid
An issue in AsyncSSH before 2.14.1 allows attackers to control the remote end of an SSH client session via packet inject
A peer-supplied maximum packet size of zero is accepted during SSH channel-open negotiation in AsyncSSH versions prior t
An issue in AsyncSSH before 2.14.1 allows attackers to control the extension info message (RFC 8308) via a man-in-the-mi
EUVD-2026-120480
NVD
CVE.org
EPSS
GitHub
Exploit-DB