CVE-2026-45309Medium▾ SunlitAsyncSSH `AuthorizedKeysFile %u` path traversal allows attacker-selected authorized keys to authenticate a traversal username
▾ Sunlit zone — Low / medium · no exploitation signal
impact 27.5 · likelihood 0.1 · exploitation 0
Need a working PoC? Pro members can cast a request and our team develops one — it lands right here.
Exploit-prediction probability, daily snapshots since Jul 18.
Disclosure to exploitation, from the record and what we observed since indexing it.
Disclosed via OSV
0.5%
Last analysed / modified upstream
AsyncSSH 2.22.0 expands the OpenSSH-compatible AuthorizedKeysFile %u token with the raw SSH username during pre-authentication server config reload. A server configured with a documented per-user key pattern such as AuthorizedKeysFile authorized_keys/%u can be made to read an authorized-keys file outside the intended directory when the SSH username contains path traversal segments. If the attacker can place or reference a readable authorized-keys-format file containing their public key, the attacker can authenticate over SSH as the traversal username.
v2.22.0, commit af5a81e669633d83d535163f93b6bf3f957c9238c3ce72b01be4f97b40e62844dd384227e5ff5a401a3793007c42f86a5c8eb537asyncssh/config.py, asyncssh/connection.py, asyncssh/auth_keys.py, asyncssh/misc.py)%u in AuthorizedKeysFile is expanded from the remote username without rejecting path separators or .. segments, and the resulting path is opened without constraining it to the intended authorized-keys directory.AuthorizedKeysFile contains %u, for example AuthorizedKeysFile authorized_keys/%u./, \, or .. before AsyncSSH uses the username for key-file selection.The run-scoped evidence contains a safe localhost proof:
Start the proof harness saved at harness_app.py
Run exploit_proof.py through run_proof.sh
The harness creates sshd_config with AuthorizedKeysFile authorized_keys/%u, writes the attacker's public key to a file outside authorized_keys/, starts a real AsyncSSH server, and attempts two SSH logins.
Expected result: the normal username victim fails, while the traversal username authenticates with the same attacker key.
Observed proof output:
[CONTROL] username=victim success=False
[ATTACK] username=../../../asyncssh-proof-exploit-proof-8b2bd23daeeb.pub success=True
[ATTACK] output=AUTH_BYPASS_SUCCESS username=../../../asyncssh-proof-exploit-proof-8b2bd23daeeb.pub
PASS: traversal username authenticated with attacker-controlled authorized_keys file
asyncssh >= 2.22.0, < 2.23.0Upgrade to a patched release:
asyncssh 2.23.0Connected by shared product, vendor, weakness, or advisory.
CVE-2026-62949Medium· 6.5AsyncSSH is a Python package which provides an asynchronous client and server implementation of the SSHv2 protocol on top of the Python asyncio framework
CVE-2026-54590Medium· 5.9asyncssh has an incomplete fix for CVE-2026-45309 — AuthorizedKeysFile %u still escapes the intended directory via a leading ~ (and weakl…
CVE-2026-54591High· 8.1asyncssh has SCP Path Traversal to Arbitrary File Write
CVE-2023-46445Medium· 5.3AsyncSSH Rogue Extension Negotiation
CVE-2023-46446High· 8.1AsyncSSH Rogue Session Attack