CVE-2026-58051

libssh2 - Free of Uninitialized Pointer in publickey List Cleanup

State
Published
Severity
8.3 High
Published
Jun 28, 2026
Updated
Jun 29, 2026
Reserved
Jun 28, 2026

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
4.08.3 HighCVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:N/VI:L/VA:H/SC:N/SI:N/SA:NVulnCheck
3.16.5 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:HVulnCheck

Weaknesses

  • CWE-908 Use of Uninitialized Resource

Affected Products

ProductVersions
libssh2libssh2
  • 1.11.1 and earlierAffected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.