Path Traversal in asyncssh (CVE-2026-54591)
Summary
Path traversal in asyncssh (CVE-2026-54591). Data can be tampered with by attackers. Exploitable via _parse_cd_args. Mitigation: upgrade to 2.23.1 or later.
Original description
The description as published by the source.
| Product | asyncssh (all versions through 2.23.0) |
| Related | CVE-2019-6111 (same class in OpenSSH) |
| Fix | AsyncSSH 2.23.1 |
A malicious SSH server can write arbitrary files on the asyncssh SCP client's filesystem by sending filenames containing ../ traversal sequences. The SCP receive path does not currently sanitize server-provided filenames. By chaining directory traversals via the D (directory) action, an attacker can escape any target directory and overwrite ~/.bashrc, ~/.ssh/rc, or ~/.ssh/authorized_keys, achieving code execution. This is the same vulnerability class as CVE-2019-6111. The mitigation applied in OpenSSH does not appear to have been adopted in asyncssh.
Steps to exploit:
Step 1 - Normal usage: Application calls await asyncssh.scp((conn, 'file'), '/home/user/downloads/'). This is the standard, documented API.
Step 2 - SCP protocol: asyncssh opens an SSH exec channel, runs scp -f file. The server controls the filename field:
C0644 100 ../pwned.txt\n (simple traversal)
D0755 0 ..\n (traverse up, repeat as needed)
C0644 47 .bashrc\n (write payload)
E\n
Step 3 - _parse_cd_args (scp.py:134-142) returns the filename verbatim:
def _parse_cd_args(args: bytes) -> Tuple[int, int, bytes]:
permissions, size, name = args.split(None, 2)
return int(permissions, 8), int(size), name # no sanitization
The returned name is not passed throu…
Source: NIST National Vulnerability Database NVD GitHub Advisory
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-54591 has been found in asyncssh.
Attackers can target a specific entry point like _parse_cd_args over the network to misuse the product.
Data can be tampered with by attackers. CVSS score: 8.1/10.
What to do: upgrade asyncssh to 2.23.1 or later.
If unsure, ask your IT team or search "asyncssh CVE-2026-54591" on the vendor's site.
CVE-2026-54591 (asyncssh) — CWE-22 / CVSS v3 8.1
Attack vector: remote (network-reachable) / unauthenticated
Attack surface: _parse_cd_args / name / _recv_files / _recv_file
Patched: 2.23.1 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
Path traversal (CWE-22) exists in asyncssh. Attackers reach the vulnerable code path via _parse_cd_args without authentication.
Check the vendor advisory for the affected versions of asyncssh. Attack surface: _parse_cd_args / name / _recv_files / _recv_file.
Severity: High (CVSS 8.1/10). Data can be tampered with by attackers.
Update to 2.23.1.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'asyncssh' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'asyncssh' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
asyncsshを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade asyncssh to 2.23.1ステージング環境で 2.23.1 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
Fix status by distribution
Fixed packages published by each distribution for this CVE
- Debian DEBIAN-CVE-2026-54591 python-asyncssh
- Ubuntu UBUNTU-CVE-2026-54591 python-asyncssh
References
- web github.com
- web github.com
- web github.com
- web nvd.nist.gov
- web github.com