CVE-2026-58051
libssh2 through 1.11.1 grows its publickey list with SSH2_REALLOC …
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.
What to do now
- Check your exposureFind out whether the affected software runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Limit access until thenIf you cannot update at once, take the system off the internet or restrict who can reach it.
References
- github.com/bikini/exploitarium/tree/main/libssh2-publickey-list-calc-poc
- github.com/libssh2/libssh2/blob/master/src/publickey.c
- www.vulncheck.com/advisories/libssh2-free-of-uninitialized-pointer-in-publickey-list-clean
- cert-portal.siemens.com/productcert/html/ssa-457936.html
- nvd.nist.gov/vuln/detail/CVE-2026-58051
- cve.org/CVERecord?id=CVE-2026-58051
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.