ALAS2-2026-3861


Amazon Linux 2 Security Advisory: ALAS2-2026-3861
Advisory Released Date: 2026-08-17
Advisory Updated Date: 2026-08-17
Severity: Important

Issue Overview:

libssh2 through 1.11.1, fixed in commit 5e47761, contains a double-free vulnerability in the sftp_open() function in src/sftp.c that allows a malicious SSH server to corrupt the heap of any authenticated client opening an SFTP session. When a server responds to SSH_FXP_OPEN with SSH_FXP_STATUS containing FX_OK, the response data buffer is freed, and if a subsequent sftp_packet_require() call returns a specific error such as LIBSSH2_ERROR_CHANNEL_PACKET_EXCEEDED, the same pointer is freed a second time, enabling tcache dup conditions on glibc systems that allow overlapping allocations and function pointer overwrites. (CVE-2026-66032)

libssh2 through 1.11.1, fixed in commit a13bb6c, contains a missing bounds check vulnerability that allows a malicious SSH server to trigger an arbitrary-length heap out-of-bounds read and a free of an uninitialized pointer via the publickey subsystem. In libssh2_publickey_list_fetch(), the version 1 response parser reads a server-controlled comment_len value and advances the parse pointer without verifying sufficient bytes remain in the buffer, causing the out-of-bounds read to leak heap pointers from adjacent allocations defeating ASLR, followed by heap allocator state corruption when the error cleanup path frees an uninitialized pointer from a non-zeroed realloc() region. (CVE-2026-66034)


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-3861 to update your system.

New Packages:
aarch64:
    libssh2-1.4.3-12.amzn2.2.9.aarch64
    libssh2-devel-1.4.3-12.amzn2.2.9.aarch64
    libssh2-debuginfo-1.4.3-12.amzn2.2.9.aarch64

i686:
    libssh2-1.4.3-12.amzn2.2.9.i686
    libssh2-devel-1.4.3-12.amzn2.2.9.i686
    libssh2-debuginfo-1.4.3-12.amzn2.2.9.i686

noarch:
    libssh2-docs-1.4.3-12.amzn2.2.9.noarch

src:
    libssh2-1.4.3-12.amzn2.2.9.src

x86_64:
    libssh2-1.4.3-12.amzn2.2.9.x86_64
    libssh2-devel-1.4.3-12.amzn2.2.9.x86_64
    libssh2-debuginfo-1.4.3-12.amzn2.2.9.x86_64