Bug 2506851 (CVE-2026-66035) - CVE-2026-66035 libssh2: libssh2: Arbitrary code execution via heap buffer overflow during SSH negotiation
Summary: CVE-2026-66035 libssh2: libssh2: Arbitrary code execution via heap buffer ove...
Keywords:
Status: NEW
Alias: CVE-2026-66035
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 2507410 2507411 2507412
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-07-24 17:01 UTC by OSIDB Bzimport
Modified: 2026-07-27 08:55 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2026-07-24 17:01:36 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.