Executive brief
A security flaw exists in libssh, a library used by applications to provide secure communication over the SSH protocol. During the initial connection process, a remote attacker could send a specially crafted security key that is shorter than expected, causing the server to read more data than intended from its own memory. While this does not allow for full system takeover, it could result in the exposure of small amounts of sensitive information from the server's memory to an unauthorized user.
Technical details
A flaw was found in libssh within the server-side GSSAPI Curve25519 key exchange path in src/kex-gss.c. Specifically, in the ssh_server_gss_kex_process_init() function, a client-supplied SSH string is unpacked into client_pubkey and subsequently copied using memcpy() with a fixed CURVE25519_PUBKEY_SIZE without validating the actual length of the input string. A remote, unauthenticated attacker can exploit this by sending a short public key in an SSH_MSG_KEXGSS_INIT message, triggering an out-of-bounds heap read. This vulnerability allows for the disclosure of small amounts of adjacent server memory during the handshake process.
Affected products
- libssh libssh unspecified
- Red Hat Red Hat Enterprise Linux 10 affected
- Red Hat Red Hat Hardened Images affected
Timeline
- 2026-07-08: disclosed: Initial report in Red Hat Bugzilla
- 2026-07-21: advisory: NVD publication date