# CVE-2026-66035: libssh2 Heap Buffer Overflow via ETM Cipher Negotiation

- Priority: **Routine**
- Reason: Not severe (CVSS 7.7, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2026-07-24 · Modified: 2026-07-28
- Aliases: RHSA-2026:46955, UBUNTU-CVE-2026-66035, DEBIAN-CVE-2026-66035, CGA-387j-6j2q-wcc9, CGA-66g3-3gv3-2pvx, CGA-hcpg-454w-h59h, CGA-j7vf-wr2r-h6vf, CGA-mh2m-fphc-j8r6, CGA-xcpq-wf9r-j32w, ALPINE-CVE-2026-66035
- Record: https://cvemate.com/vulnerability/CVE-2026-66035 · JSON: https://cvemate.com/vulnerability/CVE-2026-66035/json

## Description

```text
libssh2 through 1.11.1, fixed in commit 42e33d8, contains a pre-authentication heap buffer overflow vulnerability that allows a malicious SSH server to corrupt heap metadata in any connecting client by sending a packet with a packet_length smaller than the cipher's block size during Encrypt-then-MAC cipher negotiation. In the fullpacket() function in src/transport.c, the ETM path allocates a buffer of packet_length bytes but copies blocksize minus one bytes via memcpy, causing an overflow that on 32-bit glibc writes attacker-controlled bytes into an adjacent chunk's SIZE field, enabling tcache bin confusion, overlapping live objects, and function pointer overwrite during the session handshake before authentication.
```

## Signals

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

## 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.11.1-1+deb13u2 \| \< 1.11.1-5
- ubuntu libssh2 (Ubuntu): All versions (No fix recorded) \| \< 1.11.0-4.1ubuntu0.24.04.4 \| \< 1.11.1-1ubuntu0.26.04.4
- libssh2 libssh2: ≤ 1.11.1
- redhat libssh2 (Red Hat): \< 0:1.11.1-10.3.hum1
- redhat libssh2-devel (Red Hat): \< 0:1.11.1-10.3.hum1
- redhat libssh2-docs (Red Hat): \< 0:1.11.1-10.3.hum1

## References

- <https://github.com/libssh2/libssh2/pull/2198>
- <https://github.com/libssh2/libssh2/commit/42e33d81577ed4b95d4b4f6f845e5ee8efe5eeb4>
- <https://www.vulncheck.com/advisories/libssh2-heap-buffer-overflow-via-etm-cipher-negotiation>
- <https://access.redhat.com/errata/RHSA-2026:46955>
- <https://access.redhat.com/security/cve/CVE-2026-66035>
- <https://access.redhat.com/security/updates/classification/>
- <https://images.redhat.com/>
- <https://security.access.redhat.com/data/csaf/v2/advisories/2026/rhsa-2026_46955.json>
- <https://bugzilla.redhat.com/show_bug.cgi?id=2506851>
- <https://www.cve.org/CVERecord?id=CVE-2026-66035>
- <https://nvd.nist.gov/vuln/detail/CVE-2026-66035>
- <https://ubuntu.com/security/CVE-2026-66035>
- <https://ubuntu.com/security/notices/USN-8722-1>
- <https://security-tracker.debian.org/tracker/CVE-2026-66035>
- <https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/66xxx/CVE-2026-66035.json>
- <https://github.com/libssh2/libssh2>
- <https://security.alpinelinux.org/vuln/CVE-2026-66035>

---

Data as of 2026-12-05T06:58:44.861Z. 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
