Skip to main content

VSA-2026-066: Multiple libssh2 vulnerabilities

Published Updated Severity CVSS 4.0 Affected products
2026-11-25 2026-11-25 🟢 Low Not available yet - XCP-ng 8.3
info

Multiple vulnerabilities have been fixed in libssh2, the SSH client library used by curl (libcurl) in the control domain (dom0) of XCP-ng, and by Midnight Commander if you installed it. Exploitation of all these vulnerabilities requires connecting to a malicious SSH server. For Vates products, we classify the impact as Low. For details on how we assign severity levels, see our Severity Levels Explained page.

Summary​

libssh2 is an SSH client library. In XCP-ng 8.3, it is a dependency of curl (libcurl), for sftp:// and scp:// transfers. It is also used by Midnight Commander (mc), which is not installed by default on XCP-ng and is only present if you added it yourself. libssh2 is not used by XAPI or by Xen Orchestra.

Four vulnerabilities were fixed in libssh2. All of them are client-side and require the host to connect to a malicious SSH server. The upstream fixes have been backported to the libssh2 1.11.0 package shipped in XCP-ng 8.3.

  • CVE-2026-58051: 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-66032: 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-66033: libssh2 through 1.11.1, fixed in commit a2ed82d, contains a pre-authentication integer underflow vulnerability in the ssh2_cipher_crypt() function in src/openssl.c that allows a malicious SSH server to crash any connecting client by negotiating AES-GCM ciphers during handshake. Attackers can exploit the underflow in the expression computing blocksize minus aadlen minus authentication tag length to trigger an out-of-bounds read and a memcpy call with a near-SIZE_MAX length argument, causing immediate process crash before any authentication occurs.
  • CVE-2026-66034: 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.

Impact​

All four vulnerabilities share the same attack scenario: a malicious SSH server attacks the dom0 client process (curl, or Midnight Commander if installed) that connects to it. The host, the hypervisor, and the running VMs are not directly affected.

The most likely outcome is a crash of that client process, which interrupts the transfer or session in progress (denial of service). CVE-2026-66033 can be triggered during the SSH handshake, before any authentication takes place.

The heap corruption flaws (CVE-2026-58051, CVE-2026-66032 and CVE-2026-66034) could potentially be escalated to code execution in the client process, with the privileges of the user running it.

libssh2 is only reached when you explicitly use curl, or Midnight Commander if you installed it, to connect to a remote SSH or SFTP server. XCP-ng never does so on its own, so the exposure in a standard deployment is low.

Status​

  • Released

Affected Versions​

  • XCP-ng 8.3: Affected.

Mitigation​

There is no mitigation other than updating. Not using curl or Midnight Commander from the host to connect to untrusted SSH or SFTP servers avoids the vulnerabilities.

Resolution​

As of 2026-11-25, the libssh2 package for XCP-ng 8.3 has been updated.

List of packages fixing these issues:

  • XCP-ng 8.3:
    • libssh2-1.11.0-1.2.xcpng8.3

References​