RubySec

Providing security resources for the Ruby community

GHSA-pfqh-p9vh-wx4p (net-ssh): Pre-auth unbounded transport packet_size leads to memory exhaustion

Pre-auth unbounded transport packet_size leads to memory exhaustion

Published: October 05, 2026

SECURITY IDENTIFIERS

GEM

net-ssh

PATCHED VERSIONS

~> 7.3, >= 7.3.5 >= 8.0.0.rc2

DESCRIPTION

Summary

net-ssh's transport packet reader trusts the 4-byte wire packet length without capping it against RFC 4253 §6.1 (35000 bytes). Pre-KEX (plaintext), a malicious server can declare an arbitrarily large packet length and stream data, causing unbounded client memory growth before authentication.

Credit

Reported by zhangph (afldl), 2026-07.

RELATED