CVE-2026-66034
Wolfi Analyse et atténuation des vulnérabilités

Aperçu

CVE-2026-66034 is a missing bounds check vulnerability in libssh2's publickey subsystem that allows a malicious SSH server to trigger an arbitrary-length heap out-of-bounds read and a free of an uninitialized pointer. It affects libssh2 versions through 1.11.1 and was disclosed on July 24, 2026, with a fix committed as commit a13bb6c. The vulnerability was reported by Vladimir Eli Tokarev and assigned by VulnCheck. It carries a CVSS v3.1 score of 7.5 (High) and a CVSS v4.0 score of 7.7 (High) (Github Advisory, VulnCheck).

Détails techniques

The root cause is a missing bounds check (CWE-125: Out-of-bounds Read; CWE-908: Use of Uninitialized Resource) in the libssh2_publickey_list_fetch() function within src/publickey.c. When processing a version 1 publickey subsystem response, the parser reads a server-controlled comment_len value and advances the parse pointer (listFetch_s) without first verifying that sufficient bytes remain in the buffer (listFetch_data), enabling an arbitrary-length heap out-of-bounds read that leaks heap pointers from adjacent allocations, defeating ASLR. Additionally, the error cleanup path frees an uninitialized pointer from a non-zeroed realloc() region, causing heap allocator state corruption. The fix, merged in commit a13bb6c, adds a bounds check ensuring pkey->listFetch_s + comment_len does not exceed pkey->listFetch_data + pkey->listFetch_data_len before proceeding (libssh2 PR #2202, libssh2 commit).

Impact

Successful exploitation allows a malicious SSH server to leak heap memory pointers from the connecting client process, defeating ASLR protections and potentially enabling further exploitation. The heap allocator state corruption caused by freeing an uninitialized pointer can lead to application crashes (denial of service) or, when chained with additional vulnerabilities, potentially arbitrary code execution on the client. Confidentiality, integrity, and availability of the affected system are all rated High under CVSS v4.0, reflecting the severity of memory disclosure and heap corruption (Github Advisory, VulnCheck).

Étapes d’exploitation

  1. Set up a malicious SSH server: The attacker deploys a rogue SSH server that implements the SSH publickey subsystem and is capable of crafting malformed version 1 responses with attacker-controlled comment_len values.
  2. Lure the victim to connect: The attacker induces a client application using libssh2 (≤1.11.1) to connect to the malicious server — for example, via phishing, DNS poisoning, or a man-in-the-middle position on the network.
  3. Trigger publickey subsystem interaction: The attacker's server responds to the client's publickey subsystem request (libssh2_publickey_list_fetch()) with a crafted version 1 response containing an oversized comment_len value that exceeds the actual remaining buffer length.
  4. Induce out-of-bounds read: The vulnerable parser advances the parse pointer past the buffer boundary, reading heap memory from adjacent allocations and leaking heap pointer values to the attacker (e.g., via error messages or observable side effects).
  5. Trigger heap corruption: The error cleanup path frees an uninitialized pointer from the non-zeroed realloc() region, corrupting heap allocator state, which may be leveraged for further exploitation when combined with additional memory corruption primitives (libssh2 PR #2202, VulnCheck).

Indicateurs de compromis

  • Network: Unexpected or unsolicited SSH connections from client systems to unknown or untrusted SSH servers; SSH traffic to servers not in the organization's approved inventory.
  • Process: Application crashes or unexpected termination of processes using libssh2 during SSH publickey subsystem operations; heap corruption-related crash dumps (e.g., SIGABRT, SIGSEGV) from libssh2-linked applications.
  • Logs: Application error logs referencing libssh2_publickey_list_fetch() failures or buffer-related errors; SSH client logs showing connections to unrecognized server fingerprints.
  • File System: Presence of libssh2 versions ≤1.11.1 on systems (check shared library versions with ldconfig -p | grep libssh2 or package manager queries).

Atténuation et solutions de contournement

Update libssh2 to a version containing commit a13bb6c773f0d55ad1628cede57e99803cd898d9 or later, which adds the missing bounds check in libssh2_publickey_list_fetch(). As a workaround, restrict SSH connections to trusted, verified servers only, and implement SSH server certificate pinning or host key verification in applications using libssh2. Network segmentation to limit client exposure to untrusted SSH servers can reduce the attack surface until patching is complete (libssh2 commit, Github Advisory).

Réactions de la communauté

The vulnerability was noted on Mastodon by @thehackerwire shortly after disclosure. Community discussion has been limited, consistent with the early-stage disclosure and absence of active exploitation. The fix was developed by libssh2 maintainer vszakats and reviewed with GitHub Copilot assistance, with the reporter credited as Vladimir Eli Tokarev (libssh2 PR #2202).

Ressources additionnelles


SourceCe rapport a été généré à l’aide de l’IA

Apparenté Wolfi Vulnérabilités:

Identifiant CVE

Sévérité

Score

Technologies

Nom du composant

Exploit CISA KEV

A corrigé

Date de publication

CVE-2026-66033HIGH8.7
  • Wolfi logoWolfi
  • libssh2
NonNonJul 24, 2026
CVE-2026-66032HIGH8.7
  • Wolfi logoWolfi
  • libssh2
NonNonJul 24, 2026
CVE-2026-66035HIGH7.7
  • Wolfi logoWolfi
  • libssh2
NonNonJul 24, 2026
CVE-2026-66034HIGH7.7
  • Wolfi logoWolfi
  • libssh2
NonNonJul 24, 2026
CVE-2026-56392LOW1.8
  • Wolfi logoWolfi
  • coreutils-single
NonNonJul 24, 2026

Évaluation gratuite des vulnérabilités

Évaluez votre posture de sécurité dans le cloud

Évaluez vos pratiques de sécurité cloud dans 9 domaines de sécurité pour évaluer votre niveau de risque et identifier les failles dans vos défenses.

Demander une évaluation

Obtenez une démo personnalisée

Prêt(e) à voir Wiz en action ?

"La meilleure expérience utilisateur que j’ai jamais vue, offre une visibilité totale sur les workloads cloud."
David EstlickRSSI
"Wiz fournit une interface unique pour voir ce qui se passe dans nos environnements cloud."
Adam FletcherChef du service de sécurité
"Nous savons que si Wiz identifie quelque chose comme critique, c’est qu’il l’est réellement."
Greg PoniatowskiResponsable de la gestion des menaces et des vulnérabilités