CVE-2026-59842: Libssh: libssh: information disclosure via short gssapi curve25519 public key
A flaw was found in libssh in the server-side GSSAPI Curve25519 key exchange path in src/kex-gss.c. In sshservergsskexprocessinit(), a client-controlled SSH string is unpacked into clientpubkey and then copied with memcpy(..., CURVE25519PUBKEYSIZE) without validating sshstringlen(clientpubkey). A remote unauthenticated client can send a short public key in SSHMSGKEXGSSINIT and trigger an out-of-bounds heap read during handshake processing, disclosing small amounts of adjacent server memory.
Other sources
A flaw was found in libssh. During server-side GSSAPI key exchange, a client-supplied Curve25519 public key shorter than the expected length is copied without proper length validation, leading to an out-of-bounds heap read. This could allow a remote unauthenticated attacker to disclose small amounts of server memory.
— MITRE
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2026-59842?
The severity of CVE-2026-59842 is classified as medium with a score of 5.3.
What vulnerability does CVE-2026-59842 describe?
CVE-2026-59842 describes an information disclosure flaw in libssh related to the handling of short GSSAPI Curve25519 public keys.
How can I mitigate the risks associated with CVE-2026-59842?
To mitigate CVE-2026-59842, update libssh and apply any security patches provided by your operating system vendor.
Which software is affected by CVE-2026-59842?
CVE-2026-59842 affects libssh, as well as Red Hat Hardened Images and Red Hat Enterprise Linux.
When was CVE-2026-59842 published?
CVE-2026-59842 was published on July 8, 2026.