From 1e6f4c26336408a5a733d82acaaac4608797dea8 Mon Sep 17 00:00:00 2001 From: Al Snow <43523+jasnow@users.noreply.github.com> Date: Mon, 16 Nov 2026 13:43:26 -0500 Subject: [PATCH] Three new net-ssh advisories --- gems/net-ssh/GHSA-g2r2-x3p2-5677.yml | 32 +++++++++++++++++++ gems/net-ssh/GHSA-hjwv-j52r-xcg7.yml | 47 ++++++++++++++++++++++++++++ gems/net-ssh/GHSA-qcf4-j55x-72hv.yml | 42 +++++++++++++++++++++++++ 3 files changed, 121 insertions(+) create mode 100644 gems/net-ssh/GHSA-g2r2-x3p2-5677.yml create mode 100644 gems/net-ssh/GHSA-hjwv-j52r-xcg7.yml create mode 100644 gems/net-ssh/GHSA-qcf4-j55x-72hv.yml diff --git a/gems/net-ssh/GHSA-g2r2-x3p2-5677.yml b/gems/net-ssh/GHSA-g2r2-x3p2-5677.yml new file mode 100644 index 0000000000..3b0ea9cb70 --- /dev/null +++ b/gems/net-ssh/GHSA-g2r2-x3p2-5677.yml @@ -0,0 +1,32 @@ +--- +gem: net-ssh +ghsa: g2r2-x3p2-5677 +url: https://github.com/net-ssh/net-ssh/security/advisories/GHSA-g2r2-x3p2-5677 +title: Incomplete fix of GHSA-3x7f-q7wf-fp73 - Net::SSH::Proxy::Jump + still interpolates hops after the first comma into the shell command +date: 2026-10-26 +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. +unaffected_versions: + - "< 7.3.5" + - "< 8.0.0.rc2" +patched_versions: + - "~> 7.3.8" + - ">= 8.0.4" +related: + url: + - https://rubygems.org/gems/net-ssh/versions/8.0.4 + - https://rubygems.org/gems/net-ssh/versions/7.3.8 + - https://github.com/net-ssh/net-ssh/blob/master/CHANGES.txt + - https://github.com/net-ssh/net-ssh/security/advisories/GHSA-g2r2-x3p2-5677 +notes: | + - No CVE from GHSA URL. + - "Moderate" severity from GHSA URL diff --git a/gems/net-ssh/GHSA-hjwv-j52r-xcg7.yml b/gems/net-ssh/GHSA-hjwv-j52r-xcg7.yml new file mode 100644 index 0000000000..b58534fc8e --- /dev/null +++ b/gems/net-ssh/GHSA-hjwv-j52r-xcg7.yml @@ -0,0 +1,47 @@ +--- +gem: net-ssh +ghsa: hjwv-j52r-xcg7 +url: https://github.com/net-ssh/net-ssh/security/advisories/GHSA-hjwv-j52r-xcg7 +title: net-ssh - @revoked known_hosts entries are treated as + valid pinned host keys — revoked host key accepted +date: 2026-11-06 +description: | + Net::SSH's known_hosts parser (Net::SSH::KnownHosts#keys_for) reads + the OpenSSH @marker field but only special-cases @cert-authority. + A line marked @revoked, which is the standard OpenSSH way to + permanently retire a compromised host key, falls into the default + branch and is loaded as a regular, trusted HostKeyEntries::PubKey + pin. Every built-in host-key verifier (:always, :accept_new, and + the default :accept_new_or_local_tunnel) then matches a server + that presents exactly that revoked key and accepts it, even under + the strictest verifier. A revoked key is one the operator already + knows is compromised, and here it authenticates the host anyway. + The revocation entry quietly turns into an authorization entry. + OpenSSH's hostfile.c/check_host_key returns HOST_REVOKED for the + same line and ssh(1) aborts with "Host key ... was revoked", and + ssh_config(5) says keys on a @revoked line "must always be refused". + + ## Impact + + Host authentication bypass that opens a full SSH MITM. The attacker + can read and inject session plaintext (commands, output, uploaded + data), capture credentials sent over password auth, and take over + deploy-tool command channels, since Capistrano, Kamal, and sshkit + all sit on net-ssh. A server the operator explicitly distrusted + is accepted as the real host, so everything the user does over + that connection is exposed. +cvss_v3: 7.4 +unaffected_versions: + - "< 6.3.0.beta1" +patched_versions: + - "~> 7.3.9" + - ">= 8.1.1" +related: + url: + - https://rubygems.org/gems/net-ssh/versions/8.1.1 + - https://rubygems.org/gems/net-ssh/versions/7.3.9 + - https://github.com/net-ssh/net-ssh/blob/master/CHANGES.txt + - https://github.com/net-ssh/net-ssh/security/advisories/GHSA-hjwv-j52r-xcg7 +notes: | + - No CVE from GHSA URL. + - cvss_v3 from GHSA URL diff --git a/gems/net-ssh/GHSA-qcf4-j55x-72hv.yml b/gems/net-ssh/GHSA-qcf4-j55x-72hv.yml new file mode 100644 index 0000000000..c1b86833c3 --- /dev/null +++ b/gems/net-ssh/GHSA-qcf4-j55x-72hv.yml @@ -0,0 +1,42 @@ +--- +gem: net-ssh +ghsa: qcf4-j55x-72hv +url: https://github.com/net-ssh/net-ssh/security/advisories/GHSA-qcf4-j55x-72hv +title: Net::SSH::Proxy::HTTPS disables TLS certificate verification + by default (CWE-295) +date: 2026-11-08 +description: | + Net::SSH::Proxy::HTTPS exists specifically so that proxy authentication + credentials are sent over an encrypted channel rather than in plaintext + (per its own class documentation: "This has the advantage that proxy + authentication information is not sent in plaintext."). + + However, when a caller does not pass an explicit :ssl_context, the class + builds a bare OpenSSL::SSL::SSLContext.new. That default context has + verify_mode == VERIFY_NONE, no trust store, and no hostname verification. + The code then calls SSLSocket#connect on it. As a result the TLS + handshake to the proxy accepts any certificate, including a self-signed + certificate issued for an unrelated hostname. + + A network attacker able to intercept the connection to the proxy (the + classic threat model TLS is meant to defend against) can therefore + impersonate the proxy, complete the handshake, and capture the + Proxy-Authorization: Basic credentials that the client sends in the + CONNECT request. Because the class's documented purpose is to keep + those credentials confidential, the insecure default silently defeats + the one guarantee the class offers. +cvss_v3: 6.5 +unaffected_versions: + - "< 4.0.0.beta4" +patched_versions: + - "~> 7.3.10" + - ">= 8.1.2" +related: + url: + - https://rubygems.org/gems/net-ssh/versions/8.1.2 + - https://rubygems.org/gems/net-ssh/versions/7.3.10 + - https://github.com/net-ssh/net-ssh/blob/master/CHANGES.txt + - https://github.com/net-ssh/net-ssh/security/advisories/GHSA-qcf4-j55x-72hv +notes: | + - No CVE from GHSA URL. + - cvss_v3 from GHSA URL