Amazon Linux 2 Security Advisory: ALAS2-2026-3813
Advisory Released Date: 2026-07-20
Advisory Updated Date: 2026-07-20
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. (CVE-2026-58050)
libssh2 through 1.11.1 grows its publickey list with SSH2_REALLOC but does not zero-initialize new entries before parsing populates them, so a parse failure reaching the cleanup path leaves libssh2_publickey_list_free operating on an uninitialized entry. A malicious SSH server offering the publickey subsystem can use a malformed response to make cleanup free an uninitialized, attacker-influenceable attrs pointer in a connecting libssh2 client. (CVE-2026-58051)
Affected Packages:
libssh2
Note:
This advisory is applicable to Amazon Linux 2 (AL2) Core repository. Visit this FAQ section for the difference between AL2 Core and AL2 Extras advisories.
Issue Correction:
Run yum update libssh2 or yum update --advisory ALAS2-2026-3813 to update your system.
aarch64:
libssh2-1.4.3-12.amzn2.2.8.aarch64
libssh2-devel-1.4.3-12.amzn2.2.8.aarch64
libssh2-debuginfo-1.4.3-12.amzn2.2.8.aarch64
i686:
libssh2-1.4.3-12.amzn2.2.8.i686
libssh2-devel-1.4.3-12.amzn2.2.8.i686
libssh2-debuginfo-1.4.3-12.amzn2.2.8.i686
noarch:
libssh2-docs-1.4.3-12.amzn2.2.8.noarch
src:
libssh2-1.4.3-12.amzn2.2.8.src
x86_64:
libssh2-1.4.3-12.amzn2.2.8.x86_64
libssh2-devel-1.4.3-12.amzn2.2.8.x86_64
libssh2-debuginfo-1.4.3-12.amzn2.2.8.x86_64