# CVE-2026-45309: ronf AsyncSSH path traversal in AuthorizedKeysFile

Source: https://junglewise.ai/threats/cve-2026-45309-ronf-asyncssh-path-traversal-in-authorizedkeysfile  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-17. Updated: 2026-07-17  
License: CC BY 4.0 with a link back

CVE-2026-45309 · Severity: medium · CVSS 4 · Published 2026-07-17

AsyncSSH is a Python library used to build SSH clients and servers. A security flaw allows attackers to bypass authentication by providing a specially crafted username containing path traversal characters (like "../"). If the server is configured to look up user keys using the %u placeholder, an attacker can trick the system into reading a different file they control, allowing them to log in without a valid password or authorized key.

Technologies: [asyncssh (PyPI)](https://junglewise.ai/threats/technologies/pypi-asyncssh). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2026-45309 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-45309 being exploited in the wild.

**How severe is CVE-2026-45309?** Medium severity, with a CVSS score of 4, published 17 July 2026.

**Which products and versions are affected?** asyncssh (PyPI) ECOSYSTEM:introduced=2.22.0,fixed=2.23.0.

**Is there a fix for CVE-2026-45309?** Yes. asyncssh (PyPI): upgrade to 2.23.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-45309 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-45309?** Check whether you run asyncssh (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- asyncssh (PyPI): upgrade to 2.23.0 or later

  ```sh
  pip install "asyncssh>=2.23.0"
  ```


## Technical details

A path traversal vulnerability exists in AsyncSSH's handling of the %u token within the AuthorizedKeysFile configuration. When the server reloads configuration or processes public-key authentication, it expands the %u placeholder using the raw, unvalidated SSH username provided by the client. By supplying a username containing path traversal segments (e.g., ../, \, or /), an attacker can force the server to read an authorized-keys file from an unintended location on the filesystem. If the attacker can place or reference a file in a known location that contains their own public key, they can successfully authenticate as the traversal username. This issue is fixed in version 2.23.0 by implementing strict validation for username substitutions.

## Affected products

- ronf AsyncSSH < 2.23.0

## Identifiers

- CVE-2026-45309
- GHSA-g794-3fmp-753h
- PYSEC-2026-2384

## Timeline

- 2026-05-26: advisory: GitHub Security Advisory published
- 2026-07-17: disclosed: CVE published to NVD
- 2026-07-17: patched: Fix released in version 2.23.0

## References

- [https://github.com/ronf/asyncssh/commit/2af2382cce946c959a378a62f257af253dc4ab51](https://github.com/ronf/asyncssh/commit/2af2382cce946c959a378a62f257af253dc4ab51)
- [https://github.com/ronf/asyncssh/commit/3d515ba9ba0cd9990d248bdf62bcf05d51261a88](https://github.com/ronf/asyncssh/commit/3d515ba9ba0cd9990d248bdf62bcf05d51261a88)
- [https://github.com/ronf/asyncssh/security/advisories/GHSA-g794-3fmp-753h](https://github.com/ronf/asyncssh/security/advisories/GHSA-g794-3fmp-753h)

## Related threats

- [AsyncSSH event-loop infinite loop via zero maximum packet size](https://junglewise.ai/threats/cve-2026-62949-asyncssh-event-loop-infinite-loop-via-zero-maximum-packet-size)
- [AsyncSSH path traversal in SCP client](https://junglewise.ai/threats/cve-2026-54591-asyncssh-path-traversal-in-scp-client)
- [ronf AsyncSSH path traversal in AuthorizedKeysFile username substitution](https://junglewise.ai/threats/cve-2026-54590-ronf-asyncssh-path-traversal-in-authorizedkeysfile-username)
- [AsyncSSH vulnerable to Prefix Truncation Attack (a.k.a. Terrapin Attack) against ChaCha20-Poly1305 and Encrypt-then-MAC](https://junglewise.ai/threats/asyncssh-vulnerable-to-prefix-truncation-attack-a-k-a-terrapin-attack-70e933b5)
- [AsyncSSH Rogue Session Attack](https://junglewise.ai/threats/cve-2023-46446-asyncssh-rogue-session-attack)
