# CVE-2026-58051: libssh2 - Free of Uninitialized Pointer in publickey List Cleanup

- Severity: High 8.3 (CVSS:4.0, scored by VulnCheck) `CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:N/VI:L/VA:H/SC:N/SI:N/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.36%, higher than 31% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-06-28T01:32:54.283Z
- Modified: 2026-11-10T13:19:28.993Z
- Weaknesses: CWE-908
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- 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.

(As written by CVE List.)

## Affected

- libssh2 libssh2: up to 1.11.1

## Every score

- VulnCheck: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:H`
- VulnCheck: CVSS:4.0 8.3 High `CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:N/VI:L/VA:H/SC:N/SI:N/SA:N`

## References

- <https://github.com/bikini/exploitarium/tree/main/libssh2-publickey-list-calc-poc> (exploit, broken-link, third-party-advisory)
- <https://github.com/libssh2/libssh2/blob/master/src/publickey.c> (product)
- <https://www.vulncheck.com/advisories/libssh2-free-of-uninitialized-pointer-in-publickey-list-cleanup> (third-party-advisory)
- <https://cert-portal.siemens.com/productcert/html/ssa-457936.html>

## Sources

- CVE List: [CVE-2026-58051](https://www.cve.org/CVERecord?id=CVE-2026-58051), CVE Terms of Use, modified 2026-11-10
- NVD: [CVE-2026-58051](https://nvd.nist.gov/vuln/detail/CVE-2026-58051), Public domain, modified 2026-11-10

---

Page: https://cve.day/CVE-2026-58051 · Whole record: https://cve.day/CVE-2026-58051.json · Rebuilt by cve.day 2026-11-25T22:59:26.567Z
