Executive brief
OpenSSH, a widely used tool for secure remote access, contains a vulnerability that could allow an attacker to execute unauthorized commands. This occurs when a user provides a specially crafted username containing shell characters to the SSH client. For an exploit to succeed, the system must be using a specific, non-default configuration that processes usernames in a way that triggers the command execution.
Technical details
A command injection vulnerability exists in OpenSSH client (ssh) versions prior to 10.3. The flaw is caused by insufficient validation of shell metacharacters in usernames supplied via the command line, which are processed too late to prevent expansion from %-tokens (such as %u) in ssh_config. An attacker who can control the username passed to the ssh command can achieve arbitrary command execution if the configuration uses these tokens within a 'Match exec' block. This is considered a low-severity issue as it requires a non-default configuration and the ability to provide untrusted input to the command-line arguments. The issue is addressed in OpenSSH 10.3.
Affected products
- OpenBSD OpenSSH before 10.3
Timeline
- 2026-04-02: disclosed
- 2026-04-02: patched: Fixed in OpenSSH 10.3/10.3p1