CVE-2026-58050: libssh2 heap buffer overflow in publickey-subsystem attribute allocation

CVE-2026-58050 · Severity: high · CVSS 7 · Published 2026-06-28

libssh2 is a widely used software library that allows applications to communicate securely using the SSH protocol. A security flaw in certain versions allows a malicious server to crash or potentially take control of a client application when it attempts to connect. This could lead to service disruptions or unauthorized access to data on the system using the library.

Technologies: Libssh2. Vendors: Libssh2.

Quick answers

Is CVE-2026-58050 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-58050 being exploited in the wild.
How severe is CVE-2026-58050?
High severity, with a CVSS score of 7, published 28 June 2026.
Which products and versions are affected?
Libssh2 through 1.11.1.
Is there a fix for CVE-2026-58050?
No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.
How is CVE-2026-58050 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-58050?
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 libssh2 through version 1.11.1 where the publickey-subsystem response processing fails to perform bounds checking on an attacker-controlled 32-bit attribute count. On 32-bit platforms, the calculation 'num_attrs * sizeof(libssh2_publickey_attribute)' can result in an integer overflow, leading to an undersized heap buffer allocation. A malicious SSH server can then provide more attributes than the buffer can hold, resulting in a heap buffer overflow. This attack requires a client to connect to a compromised or malicious SSH server. While the CVSS score is 7.0, some assessments suggest a higher severity of 8.3 (CVSS 4.0).

Affected products

  • libssh2 libssh2 through 1.11.1

Timeline

  • 2026-06-27: disclosed: Initial disclosure by VulnCheck
  • 2026-06-28: advisory: NVD publication date

References

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