Skip to main content

AsyncSSH CVE-2026-77473

| EUVDEUVD-2026-120480 MEDIUM
Path Traversal (CWE-22)
2026-11-09 GitHub_M
6.5
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Victim initiates recursive SFTP get/copy
  2. Delivery
    Malicious server returns traversal/absolute filename in readdir
  3. Exploit
    posixpath.join escapes destination directory
  4. Execution
    Client writes attacker content to writable location
  5. Impact
    Overwrite 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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.5% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

asyncssh < 2.24.1

Affected Packages

euvd asyncssh fix: 2.24.1

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

Vendor (GitHub_M) PRIMARY 6.5 MEDIUM
AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
vuln.today AI 6.5 MEDIUM

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.

3.1 AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None

Lifecycle Timeline

1
Patch available
Nov 09, 2026 - 23:18 EUVD

DescriptionCVE.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

EPSS Score
0.5%
Top 54% exploitable
Prevalence
Medium
popular Python asyncio SSH/SFTP library, but library not universal like OpenSSL
Social Media
1
Sightings
Data Quality
5 sources
Confidence: Medium

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.5%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

33
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +32
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy