CVE-2026-66035
libssh2 through 1.11.1, fixed in commit 42e33d8, contains a pre-authentication heap buffer overflow vulnerability that allows a malicious SSH server to corrupt heap metadata in any connecting client by sending a packet with a packet_length smaller than the cipher's block size during Encrypt-then-MAC cipher negotiation. In the fullpacket() function in src/transport.c, the ETM path allocates a buffer of packet_length bytes but copies blocksize minus one bytes via memcpy, causing an overflow that on 32-bit glibc writes attacker-controlled bytes into an adjacent chunk's SIZE field, enabling tcache bin confusion, overlapping live objects, and function pointer overwrite during the session handshake before authentication.
- Score
- 7.7 high
- Published
- 2026-07-24
- Links
- NVD · cve.org · Report wrong data
Matched ports (2)
| Port | Package | Version | Status | Maintainer |
|---|---|---|---|---|
| security/libssh2 | libssh2 | 1.11.1_1,3 | unaddressed | sbz@FreeBSD.org |
| security/linux-c7-libssh2 | linux-c7-libssh2 | 1.8.0_2 | unaddressed | emulation@FreeBSD.org |
Template for a VuXML entry
Range taken from the CVE record, check it before committing. make newentry in security/vuxml creates the vid.
<vuln vid="FIXME (make newentry)">
<topic>FIXME -- FIXME</topic>
<affects>
<package>
<name>libssh2</name>
<range><lt>FIXME</lt></range>
</package>
<package>
<name>linux-c7-libssh2</name>
<range><lt>FIXME</lt></range>
</package>
</affects>
<description>
<body xmlns="http://www.w3.org/1999/xhtml">
<p>libssh2 through 1.11.1, fixed in commit 42e33d8, contains a
pre-authentication heap buffer overflow vulnerability that allows a
malicious SSH server to corrupt heap metadata in any connecting client
by sending a packet with a packet_length smaller than the cipher's
block size during Encrypt-then-MAC cipher negotiation. In the
fullpacket() function in src/transport.c, the ETM path allocates a
buffer of packet_length bytes but copies blocksize minus one bytes via
memcpy, causing an overflow that on 32-bit glibc writes
attacker-controlled bytes into an adjacent chunk's SIZE field,
enabling tcache bin confusion, overlapping live objects, and function
pointer overwrite during the session handshake before authentication.</p>
</body>
</description>
<references>
<cvename>CVE-2026-66035</cvename>
<url>https://nvd.nist.gov/vuln/detail/CVE-2026-66035</url>
</references>
<dates>
<discovery>2026-07-24</discovery>
<entry>2026-10-26</entry>
</dates>
</vuln>