RubySec

Providing security resources for the Ruby community

GHSA-g2r2-x3p2-5677 (net-ssh): Incomplete fix of GHSA-3x7f-q7wf-fp73 - Net::SSH::Proxy::Jump still interpolates hops after the first comma into the shell command

Incomplete fix of GHSA-3x7f-q7wf-fp73 - Net::SSH::Proxy::Jump still interpolates hops after the first comma into the shell command

Published: October 26, 2026

SECURITY IDENTIFIERS

GEM

net-ssh

UNAFFECTED VERSIONS

< 7.3.5 >= 8.0.0.beta1, < 8.0.0.rc2

PATCHED VERSIONS

~> 7.3.8 >= 8.0.4

DESCRIPTION

The fix shipped for GHSA-3x7f-q7wf-fp73 in net-ssh 7.3.5 and 8.0.0.rc2 validates the user and host of every jump, and escapes the other fields it inserts into the ssh command. It does not escape extra_jumps. Everything after the first comma is copied raw into -J and executed by /bin/sh through IO.popen.

The bypass needs two hops. The shell syntax has to be in the second hop. The same characters on a single hop are parsed as a URI path and never placed in the command.

RELATED