CVE-2026-66034: libssh2 heap out-of-bounds read in publickey_list_fetch

CVE-2026-66034 · Severity: high · CVSS 7.5 · Published 2026-07-24

libssh2 is a widely used library that allows applications to communicate securely using the SSH protocol. A vulnerability in how the library handles public key lists allows a malicious SSH server to crash an application or potentially steal sensitive information from its memory. This could lead to a loss of data confidentiality or a complete service outage for software relying on this library.

Technologies: Libssh2. Vendors: Libssh2.

Quick answers

Is CVE-2026-66034 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-66034 being exploited in the wild.
How severe is CVE-2026-66034?
High severity, with a CVSS score of 7.5, published 24 July 2026.
Which products and versions are affected?
Libssh2 through 1.11.1.
Is there a fix for CVE-2026-66034?
A patch was published on 2026-07-04: Fix submitted via GitHub pull request 2202 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-66034 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-66034?
Check whether you run Libssh2 at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

A vulnerability exists in the libssh2_publickey_list_fetch() function within the publickey subsystem. The version 1 response parser fails to validate a server-controlled 'comment_len' value against the remaining buffer size before advancing the parse pointer. This leads to an arbitrary-length heap out-of-bounds read, which can be used to leak heap pointers and bypass ASLR. Additionally, the error cleanup path may attempt to free an uninitialized pointer from a non-zeroed realloc() region, resulting in heap corruption. Exploitation requires a user to connect to a malicious SSH server. The issue is fixed in commit a13bb6c.

Affected products

  • libssh2 libssh2 through 1.11.1

Timeline

  • 2026-07-04: patched: Fix submitted via GitHub pull request 2202
  • 2026-07-24: disclosed: CVE-2026-66034 published

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.