Out-of-bounds Write Affecting libssh2 package, versions <0:1.4.3-12.amzn2.2.8


Severity

Recommended
0.0
high
0
10

Based on Amazon Linux security rating.

Threat Intelligence

EPSS
0.36% (29th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-AMZN2-LIBSSH2-18059917
  • published21 Jul 2026
  • disclosed28 Jun 2026

Introduced: 28 Jun 2026

CVE-2026-58050  (opens in a new tab)
CWE-787  (opens in a new tab)

How to fix?

Upgrade Amazon-Linux:2 libssh2 to version 0:1.4.3-12.amzn2.2.8 or higher.
This issue was patched in ALAS2-2026-3813.

NVD Description

Note: Versions mentioned in the description apply only to the upstream libssh2 package and not the libssh2 package as distributed by Amazon-Linux. See How to fix? for Amazon-Linux:2 relevant fixed versions and status.

libssh2 through 1.11.1 reads an attacker-controlled 32-bit attribute count from a publickey-subsystem response and uses it in the allocation num_attrs * sizeof(libssh2_publickey_attribute) without bounds checking, so on 32-bit platforms the multiplication overflows to an undersized buffer. A malicious SSH server can then drive the attribute-parsing loop to write past the allocation, causing a heap buffer overflow in a connecting libssh2 client.

CVSS Base Scores

version 3.1