Jan 6, 2026·9 min read·26 visits
Craft a malicious username with a newline and a syntax error, combine it with a misconfigured SSH ProxyCommand, and trick a developer into cloning a Git repo. The result? Arbitrary code execution on their machine. Your Git submodules might be betraying you.
A vulnerability exists in OpenSSH versions prior to 10.1 where the `ssh` client fails to properly sanitize control characters within usernames originating from untrusted sources, such as the command line or configuration file expansions. When a user has a specific `ProxyCommand` configured with the remote username token (`%r`), an attacker can craft a malicious username containing shell metacharacters (like newlines) and a syntax error. This combination tricks certain shells (like Bash) into executing arbitrary commands on the client's machine, leading to remote code execution. The attack is typically delivered via social engineering, for example, by convincing a developer to clone a malicious Git repository with a crafted submodule URL.
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
OpenSSH OpenBSD | < 10.1 | 10.1p1 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-159 |
| CWE Name | Improper Handling of Invalid Use of Special Elements |
| Attack Vector | Local (AV:L) |
| Attack Complexity | High (AC:H) |
| CVSS v3.1 Score | 3.6 (Low) |
| EPSS Score | 0.007% (0.00007) |
| Impact | Remote Code Execution on client machine |
| Exploit Status | Public PoC Available |
| KEV Status | Not Listed |
The product does not properly handle inputs that are not explicitly part of the syntax, but can still be processed. This may include control characters, alternate encodings, or other special characters that can have an effect on processing, even if they are not part of the defined syntax.