Skip to main content

AsyncSSH CVE-2026-138374

| EUVDEUVD-2026-137773 HIGH
Improper Neutralization of Argument Delimiters in a Command ('Argument Injection') (CWE-88)
2026-11-29 VulnCheck GHSA-2q46-77pw-8pgf
7.7
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Supply crafted host/user name to app
  2. Delivery
    App substitutes name into ProxyCommand token
  3. Exploit
    Whitespace/quotes split into extra arguments
  4. Execution
    Inject -o option into local ssh
  5. Impact
    Proxy program executes attacker command as app user

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Argument sanitization
Exploitation Conditions

Exploitation requires BOTH of these, per the GHSA advisory: (1) the application passes a host or user name from a less-trusted source into connect() (or another client function) WITHOUT validating it; and (2) the effective client config contains a matching ProxyCommand that uses the %h, %n or %r tokens (the advisory's common example is 'ssh -W %h:%p bastion'). The injected arguments run the local proxy program as the OS user running the application, before any SSH connection is made. In versions 2.20.0 through 2.24.1 an additional vector exists: a ${NAME} reference inside the supplied name is expanded to an environment variable's value, which can leak that value into the proxy command's arguments. Limiting factors: if the application validates untrusted names (rejecting whitespace, quotes, $ and a leading -), or the config does not use %h/%n/%r in ProxyCommand, or an explicit config argument without such entries is passed, the flaw is not reachable - these preconditions are why CVSS assigns AC:H and AT:P. The only complete fix is updating to AsyncSSH 2.24.2; the listed workarounds (name validation, avoiding the tokens, or an explicit safe config) are the vendor-stated mitigations.

Impact

This is a genuine but conditional risk, best characterized as a medium-high priority rather than a drop-everything emergency. The vendor/VulnCheck CVSS 4.0 vector (AV:N/AC:H/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H) yields 7.7 (High): network-reachable input but with elevated attack complexity and a present attack requirement (AT:P), reflecting that exploitation is gated by two specific preconditions rather than a default-exposed surface. The decision label is this_week, consistent with a High-severity, patch-available issue that is not flagged for emergency action. No EPSS score and no CISA KEV entry are present in the input, so there is no signal of active, widespread exploitation - exploitation status is 'no public exploit identified at time of analysis' as a weaponized artifact, though the GHSA advisory itself publishes a concrete proof-of-concept (a public PoC reference exists; it is not verified as working exploit code). The signals are internally consistent: high technical impact (full command execution as the application user) but real-world reachability depends on an application passing untrusted host/user names into connect() AND a client config whose ProxyCommand uses %h/%n/%r tokens. Note a tension worth flagging: the impact is local command execution on the client host, yet AV:N is assigned because the malicious host/user name can originate from a network-facing less-trusted source - the network metric describes where the tainted input enters, not where code runs. Priority should be driven by whether your deployment actually matches the two trigger conditions.

Exploit ScenarioDerived

An application using AsyncSSH takes a hostname (or username) from a less-trusted source - e.g. a web form or API parameter - and passes it unvalidated to asyncssh.connect(), while the account running the app has a ~/.ssh/config ProxyCommand such as 'ssh -W %h:%p bastion'. An attacker supplies a crafted name containing whitespace and an injected '-o' option (e.g. 'x --injected-option=1 y.corp.test'), which is substituted into the ProxyCommand before argument splitting, causing the local ssh/proxy program to run attacker-chosen commands as the application user before any SSH connection is established. A working proof-of-concept is published in the GHSA advisory; attack complexity is elevated because the vulnerable ProxyCommand token configuration must be present.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.5% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Nov 29, 2026

Argument injection in the AsyncSSH Python library (2.7.0 through 2.24.1) lets whoever can influence the host or user name passed to connect() append extra arguments to a locally executed ProxyCommand program, so the proxy runs attacker-chosen commands as the application's OS user before any SSH connection is established. Reachability is conditional: the application must forward an unvalidated name into AsyncSSH and the effective client config must contain a matching ProxyCommand using the %h, %n or %r tokens (for example 'ssh -W %h:%p bastion', where an injected -o option makes the local ssh client execute a command); on 2.20.0 through 2.24.1 a ${NAME} reference inside the supplied name is also expanded, leaking environment variable values into the proxy command's arguments. There is no CISA KEV listing and no confirmed working exploit code, but the vendor advisory publishes a proof-of-concept configuration and call demonstrating the injection.

RemediationAI

Vendor-released patch: upgrade AsyncSSH to 2.24.2, which splits ProxyCommand into arguments before token substitution and performs percent and environment expansion in a single pass so injected values are never re-expanded (commit 43dfcb81b86d29b605873f7c77df06f9e9920ce1, advisory GHSA-54qj-68m2-5346). The vendor describes updating as the only complete fix and lists three workarounds for environments that cannot upgrade immediately: validate host and user names from untrusted sources before passing them to connect(), rejecting whitespace, quotes, $ and a leading - (trade-off: legitimate names containing such characters are refused, so validation must be tuned to expected naming conventions); avoid %h, %n and %r in any ProxyCommand entry that can match untrusted names, since those tokens are the injection points (trade-off: static proxy targets or alternate placeholder-free configs are needed); or pass an explicit config argument whose entries contain no such tokens, which bypasses ~/.ssh/config entirely (trade-off: users lose host-specific settings from their default config). Because exploitation also depends on the application forwarding unvalidated names, sanitizing the call site reduces exposure even before the upgrade is deployed, and the vendor priority guidance places remediation in the current week rather than as an emergency.

Affected VersionsENISA

asyncssh 2.7.0 <2.24.2

Affected Packages

euvd asyncssh fix: 2.24.2

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

AsyncSSH is a pure-Python asyncio SSH client and server library, and the flaw lives in its OpenSSH-style client configuration parser (asyncssh/config.py), which reads ~/.ssh/config by default when no explicit config is passed. ProxyCommand was stored as a raw string via the generic _set_string handler; percent token expansion (%h host, %n original host name, %r remote user) was performed first, and only afterwards was the resulting string split into arguments with shell-style quoting rules. Because the proxy program is executed directly rather than through a shell, shell metacharacters were inert, but whitespace and quote characters inside a substituted host or user name changed the argument boundaries - the CWE-88 argument injection class. A second expansion pass applied ${...} environment references after token substitution, so a name containing ${SECRET} injected that environment variable's value into the proxy command in versions 2.20.0 through 2.24.1. The upstream commit 43dfcb81 reworks this: percent and environment expansion are merged into a single regex pass so substituted values are never re-expanded, and a new _set_command handler splits ProxyCommand with split_args at parse time, storing it as an argument list that connection.py consumes as a Sequence[str]. Tests were added covering split-before-expansion, no double expansion, and ProxyCommand none.

Know when Asyncssh gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 7.7 HIGH
CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
vuln.today AI 8.1 HIGH

AV:N because the tainted host/user name can enter from a network source; AC:H because exploitation depends on a specific vulnerable ProxyCommand token config plus unvalidated name passing; PR:N as no authentication to the library is inherent; full C/I/A from local command execution as the app user.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
High
Attack Requirements
Present
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

AsyncSSH 2.7.0 before 2.24.2 contains an argument injection vulnerability that allows attackers supplying host or user names to add arguments to the local proxy program by embedding whitespace or quote characters substituted into %h, %n or %r ProxyCommand tokens before splitting. Attackers can inject an -o option into the common ssh -W %h:%p bastion ProxyCommand to make the local ssh client run attacker-chosen commands as the application user.

Technical POC Analysis

CWE-88 (Improper Neutralization of Argument Delimiters in a Command).

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

A high-severity flaw in the AsyncSSH Python library allows an attacker who can influence the host or user name passed to connect() to execute arbitrary commands on the application server, potentially compromising sensitive data and operations. This affects applications that forward unvalidated names and rely on ProxyCommand configurations, putting the organization's systems and customer trust at risk if left unpatched.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.5%
Top 61% exploitable
Prevalence
Medium
popular Python asyncio SSH library, common but not universal deployment
Social Media
2
Sightings
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.5%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

Priority Score

39
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +38
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

CVE-2023-48795 MEDIUM POC
5.9 Dec 18

The SSH transport protocol with certain OpenSSH extensions, found in OpenSSH before 9.6 and other products, allows remot

CVE-2018-7749 CRITICAL
9.8 Mar 12

The SSH server implementation of AsyncSSH before 1.12.1 does not properly check whether authentication is completed befo

CVE-2026-102643 HIGH
8.8 Nov 09

Chroot escape in AsyncSSH's SFTP server (versions <= 2.24.0) lets an authenticated SFTP user read and write files outsid

CVE-2026-138377 HIGH
7.6 Nov 29

Improper X.509 certificate validation in AsyncSSH 1.13.1 through 2.24.1 allows authenticated remote clients to log in as

CVE-2026-138376 HIGH
7.4 Nov 29

Improper authentication in AsyncSSH 1.13.1 through 2.24.1 causes server-side host-based authentication state to persist

CVE-2023-46446 MEDIUM
6.8 Nov 14

An issue in AsyncSSH before 2.14.1 allows attackers to control the remote end of an SSH client session via packet inject

CVE-2026-77473 MEDIUM
6.5 Nov 09

Path traversal in AsyncSSH's recursive remote-to-local SFTP copy logic (SFTPClient._copy(), reached through get(), mget(

CVE-2026-62949 MEDIUM
6.5 Sep 16

A peer-supplied maximum packet size of zero is accepted during SSH channel-open negotiation in AsyncSSH versions prior t

CVE-2023-46445 MEDIUM
5.9 Nov 14

An issue in AsyncSSH before 2.14.1 allows attackers to control the extension info message (RFC 8308) via a man-in-the-mi

CVE-2026-138375 LOW
2.3 Nov 29

Environment-variable disclosure in AsyncSSH 2.20.0 through 2.24.1 allows a name supplied to connect() to pull process en

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy