Antonio Piazzolla : 13 October 2025 08:04
Yesterday, a vulnerability in OpenSSH, CVE-2025-61984, was published that potentially allows command execution on the client when ProxyCommand is used with usernames containing control characters (e.g., newlines).
Some OpenSSH input streams were not properly stripping control characters from usernames. An attacker could exploit this behavior by constructing a username containing, for example, a newline followed by a string that should be interpreted as a command.
When that username is inserted into the string invoked by the ProxyCommand, some shells bypass the syntax error introduced by the newline and continue execution: the next line can then be executed as the payload. Essentially, a small sequence of malicious characters, combined with a permissive shell and a certain SSH configuration, can result in an RCE.
GIT can be insidious because it exploits common developer actions. A repository may include a submodule whose SSH URL has been constructed to contain a manipulated username. When someone runs: git clone –recursive
Git also attempts to retrieve submodules via SSH—at which point the client executes the locally configured ProxyCommand. Under certain conditions, the entire chain leads to payload execution.
The exploit doesn’t activate “by itself.” Two specific conditions must be met on the victim’s system for it to work:
If both conditions are met, the manipulated username can be interpolated into the string invoked by the proxy and trigger unwanted commands.
In recent days, proof-of-concepts have been circulating that clearly explain the attack chain, but without providing practical instructions for exploiting it. These PoCs demonstrate the typical scenario: a username containing control characters is interpolated into the ProxyCommand, and a permissive shell ends up executing the next line. Many PoCs use the Git submodule example as a demonstration because it highlights the supply-chain risk: a compromised repository can easily reach developers and automated pipelines.
The operational value of PoCs isn’t teaching exploitation, but highlighting where to focus testing. However, publishing them reduces the time attackers would spend developing automated exploits, so the window for intervention is short.
The flaw is fixed by updating OpenSSH to version 10.1 , which should be done as soon as possible.