CVE-2026-58051
JSON

8.3high

libssh2 - Free of Uninitialized Pointer in publickey List Cleanup

Severity
8.3high CVSS:4.0 by VulnCheck
Exploit likelihood
0.36% (higher than 31% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
VulnCheck

Description

libssh2 through 1.11.1 grows its publickey list with SSH2_REALLOC but does not zero-initialize new entries before parsing populates them, so a parse failure reaching the cleanup path leaves libssh2_publickey_list_free operating on an uninitialized entry. A malicious SSH server offering the publickey subsystem can use a malformed response to make cleanup free an uninitialized, attacker-influenceable attrs pointer in a connecting libssh2 client.

Affected

Product or packageVersionsReported by
libssh2 libssh2up to 1.11.1CVE List, NVD

All scores

VulnCheck6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:H
VulnCheck8.3high CVSS:4.0CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:N/VI:L/VA:H/SC:N/SI:N/SA:N

Classification

CWE-908

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.

What each source says

CVE List

libssh2 through 1.11.1 grows its publickey list with SSH2_REALLOC but does not zero-initialize new entries before parsing populates them, so a parse failure reaching the cleanup path leaves libssh2_publickey_list_free operating on an uninitialized entry. A malicious SSH server offering the publickey subsystem can use a malformed response to make cleanup free an uninitialized, attacker-influenceable attrs pointer in a connecting libssh2 client.

NVD (es)

libssh2 hasta la versión 1.11.1 aumenta su lista de claves públicas con SSH2_REALLOC pero no inicializa a cero las nuevas entradas antes de que el análisis las complete, por lo que un fallo de análisis que alcanza la ruta de limpieza deja a libssh2_publickey_list_free operando sobre una entrada no inicializada. Un servidor SSH malicioso que ofrece el subsistema publickey puede usar una respuesta malformada para hacer que la limpieza libere un puntero attrs no inicializado y que puede ser influenciado por el atacante en un cliente libssh2 que se conecta.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-58051 changed 2026-11-10CVE Terms of Use
NVDCVE-2026-58051 changed 2026-11-10Public domain