CVE-2026-58050libssh2 - Integer Overflow in publickey Subsystem Attribute Allocation
libssh2 through 1.11.1 reads an attacker-controlled 32-bit attribute count from a publickey-subsystem response and uses it in the allocation num_attrs * sizeof(libssh2_publickey_attribute) without bounds checking, so on 32-bit platforms the multiplication overflows to an undersized buffer. A malicious SSH server can then drive the attribute-parsing loop to write past the allocation, causing a heap buffer overflow in a connecting libssh2 client.
What to do
Fixed builds are available from Alpine, Debian, Ubuntu: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.04 | libssh2 | Fixed | 1.11.1-1ubuntu0.26.04.3 | UBUNTU-CVE-2026-58050 |
| Ubuntu 25.10 | libssh2 | Will not fix Originally, the wrong commit was identified as being the fix for this CVE, but was still included in USN-8532-1 as CVE-2026-5805x-pre2.patch | UBUNTU-CVE-2026-58050 | |
| Ubuntu 24.04 | libssh2 | Fixed | 1.11.0-4.1ubuntu0.24.04.3 | UBUNTU-CVE-2026-58050 |
| Ubuntu 22.04 | libssh2 | Fixed | 1.10.0-3ubuntu0.1 | UBUNTU-CVE-2026-58050 |
| Ubuntu 20.04 | libssh2 | Fix pending | 1.8.0-2.1ubuntu0.1+esm1 (Ubuntu Pro) | UBUNTU-CVE-2026-58050 |
| Ubuntu 18.04 | libssh2 | Fix pending | 1.8.0-1ubuntu0.1+esm1 (Ubuntu Pro) | UBUNTU-CVE-2026-58050 |
| Ubuntu 16.04 | libssh2 | Fix pending | 1.5.0-2ubuntu0.1+esm3 (Ubuntu Pro) | UBUNTU-CVE-2026-58050 |
| Ubuntu 14.04 | libssh2 | Fix pending | 1.4.3-2ubuntu0.2+esm4 (Ubuntu Pro) | UBUNTU-CVE-2026-58050 |
| Debian 14 | libssh2 | Fixed | 1.11.1-6 | DEBIAN-CVE-2026-58050 |
| Debian 13 | libssh2 | Fixed | 1.11.1-1+deb13u2 | DEBIAN-CVE-2026-58050 |
| Debian 12 | libssh2 | Fixed | 1.10.0-3+deb12u1 | DEBIAN-CVE-2026-58050 |
| Red Hat Enterprise Linux 6 | libssh2 | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | libssh2-devel | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | libssh2-docs | Will not fix Out of support scope | ||
| Alpine Linux 3.24 | libssh2 | Fixed | 1.11.1-r4 | ALPINE-CVE-2026-58050 |
| Alpine Linux 3.23 | libssh2 | Fixed | 1.11.1-r4 | ALPINE-CVE-2026-58050 |
| Alpine Linux 3.22 | libssh2 | Fixed | 1.11.1-r3 | ALPINE-CVE-2026-58050 |
| Alpine Linux 3.21 | libssh2 | Fixed | 1.11.1-r3 | ALPINE-CVE-2026-58050 |
What the vendor says
As published in the CVE record by VulnCheck, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- libssh2: affected: up to 1.11.1
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-integer-overflow-in-publickey-subsystem-attribute-allocation
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.