
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-35386 is a shell metacharacter injection vulnerability in OpenSSH before version 10.3 that can allow command execution when an untrusted username is passed on the command line. The flaw requires a non-default ssh_config configuration using % token expansion (e.g., %u in a Match exec block). It affects all OpenSSH versions prior to 10.3, as well as downstream products including IBM AIX/VIOS and Microsoft Azure Linux 3 packages. The vulnerability was publicly disclosed on April 2, 2026, coinciding with the OpenSSH 10.3 release. CVSS scores differ by source: NVD/Feedly assign a CVSS v3.1 score of 8.1 (High) with a network attack vector, while GitHub Advisory Database and ENISA assign a lower score of 3.6 (Low) reflecting a local attack vector with required privileges (GitHub Advisory, oss-security).
The root cause is classified as CWE-696 (Incorrect Behavior Order): validation of shell metacharacters in usernames supplied on the ssh(1) command line was performed too late, after %-token expansion in ssh_config had already occurred. This means that if a configuration directive such as Match exec uses the %u token (which expands to the username), an attacker-controlled username containing shell metacharacters can be expanded and executed by the shell before sanitization takes effect. Exploitation requires two preconditions: (1) the username passed to ssh(1) on the command line must be attacker-controlled (e.g., in a wrapper script or automated pipeline), and (2) the ssh_config must use a non-default %-token configuration such as %u in a Match exec block. The vulnerability was reported by Florian Kohnhäuser and disclosed in the OpenSSH 10.3 release announcement (oss-security, GitHub Advisory).
Successful exploitation allows an attacker who can control the username argument passed to ssh(1) to execute arbitrary shell commands on the system running the SSH client, with the privileges of the user invoking ssh. The impact is limited to environments with the specific non-default ssh_config configuration; default OpenSSH deployments are not affected. In vulnerable configurations, confidentiality, integrity, and availability of the affected system could all be compromised, potentially enabling lateral movement if the SSH client is used in automated or privileged workflows (oss-security, GitHub Advisory).
As of the time of disclosure, there is no public proof-of-concept exploit and no evidence of in-the-wild exploitation (GitHub Advisory). The EPSS score is approximately 0.007% (0.000070), indicating a very low probability of exploitation in the near term. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. No threat actor attribution has been reported. The high attack complexity and requirement for non-default configuration significantly limit the exploitable attack surface.
ssh(1) is invoked with an attacker-controlled username (e.g., via a wrapper script, CI/CD pipeline, or automated SSH utility).ssh_config (or ~/.ssh/config) contains a %-token directive that incorporates the username, such as Match exec "some-command %u" or similar.validuser; malicious-command # or using backtick/subshell syntax.ssh with the crafted username on the command line, e.g., ssh 'validuser;id #'@target.%u token in the Match exec block expands the malicious username before sanitization, causing the shell to execute the injected command with the privileges of the user running ssh (oss-security).ssh or its child processes.ssh(1) (e.g., /bin/sh, bash, curl, wget, nc) that are not typical for normal SSH usage.ssh, particularly if created around the time of SSH connections.ssh(1) to unexpected external hosts, which may indicate a reverse shell or data exfiltration attempt.The primary remediation is to upgrade OpenSSH to version 10.3 or later, which validates shell metacharacters in usernames before %-token expansion occurs (oss-security). As a workaround, administrators should audit ssh_config files and remove or avoid non-default %-token configurations (especially %u in Match exec blocks) if not strictly required. Ensure that usernames passed to ssh(1) on the command line are always from trusted, validated sources — never directly from untrusted user input. Downstream vendors including Red Hat, Ubuntu, Debian, AlmaLinux, Rocky Linux, Amazon Linux, IBM AIX, and Fedora have released patched packages (IBM Advisory, GitHub Advisory).
The OpenSSH development team disclosed the vulnerability responsibly alongside the 10.3 release, crediting Florian Kohnhäuser for the report and noting that direct exposure of ssh(1) command lines to untrusted input is strongly discouraged (oss-security). Security coverage appeared on SecurityOnline.info shortly after disclosure, and the vulnerability was picked up by multiple Linux distribution security teams including Red Hat, Ubuntu, Debian, and Fedora, all of whom issued advisories and patched packages. Juniper Networks also published an impact assessment for Junos OS and Junos OS Evolved platforms. Community reaction was measured, reflecting the limited exploitability due to the non-default configuration requirement.
Fix availability across major Linux distributions and their releases.
bookworm
openssh: 1:9.2p1-2+deb12u10
sid
openssh: 1:10.3p1-1
trixie
openssh: 1:10.0p1-7+deb13u3
bionic (esm-infra)
openssh
bionic (fips-updates)
openssh
bionic (fips)
openssh
devel
openssh
focal (esm-infra)
openssh
focal (fips-updates)
openssh
focal (fips)
openssh
jammy
openssh: 1:8.9p1-3ubuntu0.15
OpenShift
openshift/ose-rhel-coreos-8
RHEL 8
:appstream:openssh-0:8.0p1-29.el8_10.src
RHEL 9
:appstream:openssh-0:8.7p1-30.el9_2.11.src
RHEL 10
openssh-0:9.9p1-7.el10_0.3.src
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."