CVE Catalog

CVE-2026-58051

MediumCVSS 6.5
Published: Updated: Translated: NVD NIST

Exploitation Probability (EPSS)

Low risk
0.28%

20th percentile - higher than 20% of all known CVEs

Summary

In libssh2 up to version 1.11.1, when growing the publickey list with SSH2_REALLOC, new entries are not zero-initialized before parsing populates them. A parse failure reaching the cleanup path causes libssh2_publickey_list_free to operate on an uninitialized entry, potentially freeing an attacker-influenceable attrs pointer.

Risk Assessment

A malicious SSH server offering the publickey subsystem can exploit this vulnerability to trigger a use-after-free or double-free condition in the libssh2 client, potentially leading to remote code execution or application crash.

Recommendation

Immediately upgrade libssh2 to version 1.11.2 or later, which includes a fix that zero-initializes new entries before use. If an upgrade is not possible, restrict trust to SSH servers offering the publickey subsystem.

Other vulnerabilities in libssh2

See all
Original NVD description (English source)

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.

Vulnerability data from NVD (NIST) · CISA KEV · EPSS