CVE-2026-66035
Received Received - Intake

Heap Buffer Overflow in libssh2 Library

Vulnerability report for CVE-2026-66035, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-07-24

Last updated on: 2026-07-24

Assigner: VulnCheck

Description

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-07-24
Last Modified
2026-07-24
Generated
2026-07-24
AI Q&A
2026-07-24
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
libssh2 libssh2 to 1.11.1 (inc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-122 A heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory, generally meaning that the buffer was allocated using a routine such as malloc().

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

libssh2 through 1.11.1 has a pre-authentication heap buffer overflow flaw. A malicious SSH server can exploit this by sending a packet with a packet_length smaller than the cipher's block size during Encrypt-then-MAC cipher negotiation. This causes a buffer overflow in the fullpacket() function in src/transport.c, corrupting heap metadata in the client before authentication.

Detection Guidance

This vulnerability involves a malicious SSH server exploiting a client-side heap buffer overflow in libssh2 versions before 1.11.1. Detection requires checking libssh2 versions on clients and monitoring network traffic for malformed SSH handshake packets with packet_length smaller than the cipher's block size during Encrypt-then-MAC negotiation.

Impact Analysis

An attacker could exploit this to execute arbitrary code, take control of the client system, or crash the application. Since it occurs before authentication, it affects all connections to vulnerable servers, potentially leading to unauthorized access or data breaches.

Compliance Impact

This vulnerability could lead to unauthorized access or data breaches, violating confidentiality requirements in GDPR and HIPAA. Organizations using vulnerable libssh2 versions may face compliance violations, fines, or legal consequences if exploited.

Mitigation Strategies

Immediately update libssh2 to version 1.11.1 or later. If updating is not possible, disable Encrypt-then-MAC cipher suites on both clients and servers. Monitor network traffic for suspicious SSH handshake patterns and block or investigate any servers attempting unusual packet negotiations.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-66035. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart