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

- Priority: **Prioritise**
- Reason: Public exploit (GitHub, Date unknown)
- Next step: Check applicability and the vendor advisory: no fix release is recorded here
- Status: published
- Published: 2026-06-28 · Modified: 2026-11-10
- Aliases: RHSA-2026:46535, UBUNTU-CVE-2026-58051, DEBIAN-CVE-2026-58051, CGA-42w3-fgjq-6w4x, CGA-4whh-g4r6-6gg8, CGA-cj8h-wrv2-vfr5, CGA-fgcp-6748-gxjc, CGA-grp9-rff8-g889, CGA-mqxm-fw2j-hr43, ALPINE-CVE-2026-58051
- Record: https://cvemate.com/vulnerability/CVE-2026-58051 · JSON: https://cvemate.com/vulnerability/CVE-2026-58051/json

## Description

```text
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.
```

## Signals

- CVSS: 8.3 high (v4.0, CVE.org) 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
- EPSS: 0.358%, percentile 31.542%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 1 (github)

## Affected

- alpine libssh2 (Alpine Linux): \< 1.11.1-r3 \| \< 1.11.1-r4
- chainguard libssh2 (Chainguard): All versions (No fix recorded)
- chainguard libssh2-dev (Chainguard): All versions (No fix recorded)
- chainguard libssh2-doc (Chainguard): All versions (No fix recorded)
- wolfi libssh2 (Wolfi): All versions (No fix recorded)
- wolfi libssh2-dev (Wolfi): All versions (No fix recorded)
- wolfi libssh2-doc (Wolfi): All versions (No fix recorded)
- debian libssh2 (Debian): \< 1.10.0-3+deb12u1 \| \< 1.11.1-1+deb13u2 \| \< 1.11.1-6
- ubuntu libssh2 (Ubuntu): \< 1.4.3-2ubuntu0.2+esm4 \| \< 1.5.0-2ubuntu0.1+esm3 \| \< 1.8.0-1ubuntu0.1+esm1 \| \< 1.8.0-2.1ubuntu0.1+esm1 \| \< 1.10.0-3ubuntu0.1 \| \< 1.11.0-4.1ubuntu0.24.04.3 \| All versions (No fix recorded) \| \< 1.11.1-1ubuntu0.26.04.3
- libssh2 libssh2: ≤ 1.11.1
- redhat libssh2 (Red Hat): \< 0:1.11.1-10.1.hum1
- redhat libssh2-devel (Red Hat): \< 0:1.11.1-10.1.hum1
- redhat libssh2-docs (Red Hat): \< 0:1.11.1-10.1.hum1

## References

- <https://github.com/bikini/exploitarium/tree/main/libssh2-publickey-list-calc-poc>
- <https://github.com/libssh2/libssh2/blob/master/src/publickey.c>
- <https://www.vulncheck.com/advisories/libssh2-free-of-uninitialized-pointer-in-publickey-list-cleanup>
- <https://access.redhat.com/errata/RHSA-2026:46535>
- <https://access.redhat.com/security/cve/CVE-2026-58051>
- <https://access.redhat.com/security/updates/classification/>
- <https://images.redhat.com/>
- <https://security.access.redhat.com/data/csaf/v2/advisories/2026/rhsa-2026_46535.json>
- <https://bugzilla.redhat.com/show_bug.cgi?id=2493950>
- <https://www.cve.org/CVERecord?id=CVE-2026-58051>
- <https://nvd.nist.gov/vuln/detail/CVE-2026-58051>
- <https://ubuntu.com/security/CVE-2026-58051>
- <https://github.com/libssh2/libssh2/pull/2202>
- <https://ubuntu.com/security/notices/USN-8532-1>
- <https://ubuntu.com/security/notices/USN-8799-1>
- <https://security-tracker.debian.org/tracker/CVE-2026-58051>
- <https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/58xxx/CVE-2026-58051.json>
- <https://security.alpinelinux.org/vuln/CVE-2026-58051>
- <https://cert-portal.siemens.com/productcert/html/ssa-457936.html>

---

Data as of 2026-12-05T07:13:44.033Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
