# JLSEC-2026-663: libssh2 through 1.11.1 grows its publickey list with `SSH2_REALLOC` but does not zero-initialize new...

- Severity: Medium 6.5 (CVSS:3.1, scored by Julia Security Advisories) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-07-11T04:13:36.542Z
- Modified: 2026-07-25T18:23:59.098Z
- Related: CVE-2026-58051, GHSA-c5f3-hwj2-xp5p, EUVD-2026-39971

## 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 Julia Security Advisories.)

## Affected

- LibSSH2_jll (Julia): before 1.11.103+0

## Every score

- Julia Security Advisories: 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`
- Julia Security Advisories: CVSS:4.0 `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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X`

## References

- <https://github.com/bikini/exploitarium/tree/main/libssh2-publickey-list-calc-poc> (exploit, web)
- <https://github.com/advisories/GHSA-c5f3-hwj2-xp5p> (web)
- <https://github.com/libssh2/libssh2/blob/master/src/publickey.c> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-58051> (web)
- <https://www.vulncheck.com/advisories/libssh2-free-of-uninitialized-pointer-in-publickey-list-cleanup> (web)

## Sources

- Julia Security Advisories: [JLSEC-2026-663](https://osv.dev/vulnerability/JLSEC-2026-663), CC-BY-4.0, modified 2026-07-25

---

Page: https://cve.day/JLSEC-2026-663 · Whole record: https://cve.day/JLSEC-2026-663.json · Rebuilt by cve.day 2026-11-25T22:56:26.195Z
