CVE-2026-66033: libssh2 integer underflow in ssh2_cipher_crypt

CVE-2026-66033 · Severity: high · CVSS 7.5 · Published 2026-07-24

libssh2 is a widely used library that allows applications to communicate securely using the SSH protocol. A vulnerability in this library allows a malicious server to crash any application that attempts to connect to it. This occurs before the user even logs in, potentially leading to a widespread denial-of-service for tools and services that rely on libssh2 for automated data transfers or remote management.

Technologies: Libssh2. Vendors: Libssh2.

Quick answers

Is CVE-2026-66033 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-66033 being exploited in the wild.
How severe is CVE-2026-66033?
High severity, with a CVSS score of 7.5, published 24 July 2026.
Which products and versions are affected?
Libssh2 through 1.11.1.
Is there a fix for CVE-2026-66033?
A patch was published on 2026-07-23: Fix merged in pull request 2401 and commit a2ed82d Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-66033 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-66033?
Check whether you run Libssh2 at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

An integer underflow vulnerability exists in the `ssh2_cipher_crypt()` function within `src/openssl.c` of libssh2. The flaw is triggered during the SSH handshake when a malicious server negotiates the use of AES-GCM ciphers. The root cause is an unchecked expression calculating the encryption length (`blocksize - aadlen - authenticationtag`), which can underflow to a large positive value. This leads to an out-of-bounds read and a subsequent `memcpy` call with a length argument near `SIZE_MAX`, resulting in an immediate process crash. The vulnerability is pre-authentication and requires no user interaction beyond the initial connection attempt. A fix is available in commit a2ed82d which introduces runtime bounds checks.

Affected products

  • libssh2 libssh2 through 1.11.1

Timeline

  • 2026-07-23: patched: Fix merged in pull request 2401 and commit a2ed82d
  • 2026-07-24: disclosed: CVE-2026-66033 published

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.