AsyncSSH 2.24.2 Patches Argument Injection Flaw in ProxyCommand Handling
The flaw lets crafted host or user names inject arguments into local proxy commands; the fix reverses argument splitting and substitution.
The maintainer of AsyncSSH, a widely used Python SSH library, has released version 2.24.2 to fix an argument injection vulnerability tracked as CVE-2026-138374. The official GitHub security advisory was published on 27 November, and a National Vulnerability Database entry followed on 29 November.
Versions 2.7.0 through 2.24.1 are affected when an OpenSSH-style configuration uses ProxyCommand with the %h, %n or %r tokens: host and user names passed to connect() are substituted into the proxy command before it is split into arguments. A crafted name containing spaces or quotes can inject additional arguments into the local proxy program — in the common "ProxyCommand ssh -W %h:%p bastion" pattern, injected -o options can make the local SSH client run attacker-chosen commands. Versions 2.20.0 to 2.24.1 also expanded ${ENV} references embedded in names.
The fix reverses the order of operations, splitting arguments before substitution. Scores of 7.7 under CVSS 4.0 and 6.8 under CVSS 3.1 have been assigned. Exploitation requires unvalidated host or user names from untrusted sources; no public exploit or KEV listing was known as of 29 November.