Impact
A pre‑authentication heap buffer overflow exists in libssh2 versions up to 1.11.1. During Encrypt‑then‑MAC (ETM) cipher negotiation the server sends a packet whose declared length is smaller than the block size. The client allocates a buffer of that length but copies a larger block into it, overwriting heap metadata. On 32‑bit glibc this corrupts a chunk’s SIZE field, enabling tcache bin confusion, overlapping live objects, and ultimately a function pointer overwrite before authentication is completed. The overflow therefore permits an attacker to execute arbitrary code in the client process during the SSH session establishment.
Affected Systems
The vulnerability affects all installations of libssh2 up to and including version 1.11.1, regardless of the platform, because the issue is in the core transport implementation. Any client that imports libssh2 and connects to a malicious SSH server may be exposed. Upgrades to libssh2 1.11.2 or later contain the fix evidenced by commit 42e33d8.
Risk and Exploitability
The CVSS score of 7.7 indicates a high severity. The EPSS score of less than 1% suggests that exploitation is currently uncommon or difficult. The vulnerability is not listed in the CISA KEV catalog. Attack requires an untrusted SSH server to send a malformed ETM packet before client authentication. The lack of authentication at the beginning of the handshake makes exploitation likely if the attacker controls the server side.
OpenCVE Enrichment