CVE-2026-59842
Received Received - Intake

Heap Out-of-Bounds Read in libssh GSSAPI Key Exchange

Vulnerability report for CVE-2026-59842, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-07-21

Last updated on: 2026-07-21

Assigner: Red Hat, Inc.

Description

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-07-21
Last Modified
2026-07-21
Generated
2026-07-21
AI Q&A
2026-07-21
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 2 associated CPEs
Vendor Product Version / Range
libssh libssh to 3.0.0 (exc)
libssh libssh *

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-125 The product reads data past the end, or before the beginning, of the intended buffer.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability is in libssh during server-side GSSAPI key exchange. A client can send a short Curve25519 public key without proper length validation. The server copies this key using memcpy without checking its length, causing an out-of-bounds heap read. This allows a remote unauthenticated attacker to disclose small amounts of server memory.

Detection Guidance

Detecting this vulnerability requires monitoring SSH server logs for malformed GSSAPI key exchange attempts. Check for SSH_MSG_KEXGSS_INIT messages with unusually short Curve25519 public keys. Use tcpdump or Wireshark to capture SSH traffic and inspect key exchange packets for anomalies.

Impact Analysis

An attacker could exploit this to read small portions of server memory. This might expose sensitive data like session keys, user credentials, or other confidential information processed by the server. The impact is limited to information disclosure and requires no authentication.

Compliance Impact

This vulnerability does not directly impact compliance with GDPR, HIPAA, or similar standards as it involves a low-severity memory disclosure issue in libssh during SSH key exchange. Standards like GDPR and HIPAA focus on data protection and privacy, but this flaw only exposes small amounts of server memory without direct access to sensitive data.

Mitigation Strategies

Update libssh to the latest patched version immediately. If patching is not possible, disable GSSAPI-based authentication in the SSH server configuration by setting GSSAPIAuthentication no in sshd_config. Restrict SSH access via firewall rules to trusted IPs as a temporary measure.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-59842. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart