CVE-2026-54590: AsyncSSH Path Traversal in SSH Authorized Keys File Handling
AsyncSSH, a Python library for SSH protocol implementation, contains a path traversal vulnerability in version 2.23.0 that allows attackers to read SSH authorized keys files from outside their intended directory. The vulnerability exists because the code blocks certain path traversal characters (/, comma, and double dots) before substitution, but fails to block tilde (~) and environment variable syntax (${ENV}), which are expanded later in the process. This allows an attacker with network access to potentially retrieve sensitive key data by crafting specially formatted authorized keys file paths. The issue has been patched in version 2.23.1.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 5.9 MEDIUM · CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
- Weaknesses (CWE)
- CWE-22, CWE-639
- Affected products
- 0 configuration(s)
- Published / Modified
- 2026-07-08 / 2026-07-10
NVD description (verbatim)
AsyncSSH is a Python package which provides an asynchronous client and server implementation of the SSHv2 protocol on top of the Python asyncio framework. Version 2.23.0 contains an incomplete fix for CVE-2026-45309 in SSHServerConfig._set_tokens that blocks /, , and .. before %u substitution in AuthorizedKeysFile but does not block a leading ~ or ${ENV}, allowing later expansion in _expand_val and Path(filename).expanduser() to escape the intended authorized-keys directory. This issue is fixed in version 2.23.1.
4 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
CVE-2026-54590 is a path traversal flaw in AsyncSSH's SSHServerConfig._set_tokens method. The vulnerability stems from incomplete input sanitization in the AuthorizedKeysFile parameter. While the code removes forward slashes, commas, and double dots before the %u substitution placeholder, it does not filter leading tilde (~) characters or environment variable expressions (${ENV}). During subsequent processing in _expand_val and Path(filename).expanduser(), these unfiltered sequences are expanded by Python's path resolution functions, allowing directory escape. The attack relies on the tilde expansion to reference home directories or environment variables outside the intended authorized-keys directory scope. This is an incomplete fix for the earlier CVE-2026-45309, which addressed similar issues but did not account for all expansion vectors.
Business impact
A successful exploitation of this vulnerability could allow unauthorized SSH server operators or network-adjacent attackers to enumerate or exfiltrate SSH public key material stored outside the intended authorized-keys directory. While the CVSS score reflects medium severity, the business impact depends on deployment context. Organizations running AsyncSSH as an SSH server where untrusted users can influence the AuthorizedKeysFile configuration face the greatest risk. Compromise of SSH keys can lead to lateral movement, persistent access, or identity spoofing within infrastructure environments. The impact is limited by the requirement for high attack complexity and the fact that integrity rather than confidentiality is the primary concern in the CVSS vector.
Affected systems
AsyncSSH version 2.23.0 is the only version confirmed affected by this vulnerability. Any system running this specific version of AsyncSSH, particularly those using it as an SSH server implementation in Python-based applications, requires immediate patching. The vulnerability is applicable across all platforms where AsyncSSH 2.23.0 is deployed (Linux, Windows, macOS, etc.). Organizations should verify whether AsyncSSH is used as a dependency in their SSH server implementations, secure shell proxy solutions, or custom SSH tooling. Version 2.23.1 and later versions contain the fix and should be targeted.
Exploitability
Exploitation requires network access to an AsyncSSH SSH server running version 2.23.0. The attacker must craft an SSH authentication attempt with a specially constructed authorized keys file path containing tilde or environment variable syntax. The high attack complexity (AC:H in the CVSS vector) reflects the requirement to manipulate or predict the AuthorizedKeysFile path in a meaningful way. The attack does not require authentication or user interaction. While not currently in CISA's Known Exploited Vulnerabilities catalog, the relative simplicity of path traversal exploitation and the clear technical vector suggest this could become practically exploited once public details emerge. No public exploit code is known to exist at this time.
Remediation
Immediate action: Upgrade AsyncSSH from version 2.23.0 to version 2.23.1 or later. This is the definitive fix and should be prioritized for all systems running the affected version. Before upgrading, verify that the newer version is compatible with your application and dependencies. Test the upgrade in a non-production environment first, as SSH infrastructure changes can be disruptive. Additionally, review SSH server configurations to minimize the exposure of AuthorizedKeysFile paths to untrusted input sources. If running older versions of AsyncSSH, ensure you are not also affected by CVE-2026-45309, which this fix was intended to address.
Patch guidance
Update AsyncSSH to version 2.23.1 or later through your package management system (pip, conda, or your distribution's package manager). Verify the update using pip show asyncssh or equivalent tooling to confirm version 2.23.1 is installed. No manual configuration changes are required after patching; the fix is purely code-level. Test SSH connectivity and key-based authentication immediately after patching to ensure no disruption. If you have custom SSH server implementations built on AsyncSSH, ensure they are redeployed with the patched library. Check upstream projects or frameworks that may bundle AsyncSSH (if any) for their own release schedules.
Detection guidance
Log analysis: Search SSH server logs for authentication attempts with unusual AuthorizedKeysFile parameters containing tilde (~) or ${...} syntax, particularly if they differ from expected configuration. Network detection: Monitor for SSH authentication attempts with crafted key file paths or environment variable references. Source code review: Examine AuthorizedKeysFile configuration in any custom AsyncSSH implementations to identify potential tilde or variable expansion issues. Dependency scanning: Use Software Composition Analysis (SCA) tools to identify AsyncSSH 2.23.0 in your codebase. If detected, it should trigger an immediate patching workflow. Consider proactive testing in a sandbox environment to confirm your AsyncSSH deployment is vulnerable before public exploits surface.
Why prioritize this
While the CVSS score of 5.9 (MEDIUM) reflects moderate severity, this vulnerability should be prioritized for rapid patching because: (1) it is an incomplete fix for a prior path traversal issue, suggesting security fundamentals were overlooked; (2) path traversal vulnerabilities are well-understood and relatively easy to exploit once technical details emerge; (3) SSH key material is high-value target data in infrastructure environments; (4) the fix is straightforward (version upgrade) with no backward compatibility concerns noted; (5) not yet in KEV but likely to be added once public awareness grows. Organizations running AsyncSSH as a production SSH server should treat this as a near-critical priority for patch deployment within 48–72 hours.
Risk score, explained
The CVSS 3.1 score of 5.9 (MEDIUM) is driven by: High Impact on Integrity (the I:H component) — unauthorized access to SSH keys violates confidentiality of authentication material; No Impact on Confidentiality or Availability (C:N, A:N) — the vulnerability does not directly expose other data or interrupt service; High Attack Complexity (AC:H) — requires crafted input and specific path manipulation; Network-based (AV:N) — exploitable remotely via SSH protocol; No Privilege Requirement (PR:N) and No User Interaction (UI:N). The MEDIUM rating appropriately reflects that exploitation is plausible but requires specific conditions. In practical terms, the impact of SSH key compromise in an active infrastructure environment may be higher than the score suggests, warranting risk-context adjustment during prioritization.
Frequently asked questions
Is this vulnerability being actively exploited in the wild?
No. As of the current date, CVE-2026-54590 is not listed in CISA's Known Exploited Vulnerabilities catalog, and no public exploit code is known. However, path traversal flaws in SSH implementations are high-value targets, so exploitation could begin once technical details or proof-of-concept code become widely available. Proactive patching is strongly advised.
Does this affect AsyncSSH clients, or only servers?
This vulnerability is specific to AsyncSSH SSH server implementations. The flaw exists in SSHServerConfig, which is used when AsyncSSH is deployed as an SSH server. Clients using AsyncSSH for outbound SSH connections are not affected. Review your AsyncSSH use case: if you are building an SSH server (e.g., a custom secure shell service), you are at risk if running version 2.23.0.
What is the relationship between this vulnerability and CVE-2026-45309?
CVE-2026-54590 is an incomplete fix for CVE-2026-45309. Version 2.23.0 attempted to block certain path traversal characters (/, comma, ..) in the AuthorizedKeysFile parameter, but did not account for tilde expansion or environment variable substitution. Version 2.23.1 closes both gaps. If your organization patched CVE-2026-45309 by updating to 2.23.0, you must update again to 2.23.1.
Do I need to change SSH server configuration after patching to 2.23.1?
No configuration changes are required. Simply update the AsyncSSH package to version 2.23.1 or later. The fix is internal to the library code. Existing SSH server configurations will continue to work correctly with the patched version. Test in a staging environment to confirm there are no unexpected side effects before production rollout.
This analysis is provided for informational purposes based on publicly available vulnerability data current as of the advisory publication date. SEC.co does not provide legal, compliance, or operational advice. Organizations must conduct their own risk assessment, test patches in controlled environments, and follow their internal change management procedures before deploying fixes to production systems. Patch version numbers and compatibility claims referenced herein should be verified against official AsyncSSH release notes and vendor advisories. No exploit code or weaponized proof-of-concept information is provided in this document. For the latest vulnerability data and vendor guidance, refer to the official AsyncSSH GitHub repository and NIST NVD. Source: NVD (public-domain), retrieved 2026-08-17. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-49339HIGHGonic Path Traversal Bypass in Playlist Ownership Check
- CVE-2018-25393MEDIUMNavigate CMS 2.8.5 Path Traversal Vulnerability (CVSS 6.5)
- CVE-2018-25421MEDIUMOpen STA Manager 2.3 Path Traversal File Download Vulnerability
- CVE-2019-25734MEDIUMContact Form by WD CSRF & Local File Inclusion Vulnerability
- CVE-2019-25740MEDIUMJoomla com_jsjobs Arbitrary File Deletion Vulnerability
- CVE-2022-50953MEDIUMWordPress admin-word-count-column Plugin Local File Read Vulnerability
- CVE-2023-40200MEDIUMWP Logo Showcase Authorization Bypass Vulnerability (CVSS 5.3)
- CVE-2024-47263MEDIUMSynology Hyper Backup Path Traversal – Admin Privilege Required