CVE-2026-58050: libssh2 - Heap Buffer Overflow
- Cve: CVE-2026-58050
- Name: libssh2 - Heap Buffer Overflow
- Description: 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.
- Impact: A malicious SSH server can cause heap buffer overflow in the client, potentially leading to memory corruption or remote code execution.
- Remediation: Update to a version later than 1.11.1 or the latest available version.
- Vulnerability type: buffer_overflow
- Vulnerability impact: remote_code_execution
- Requirements: Attacker must control the SSH server the client connects to
- Labels source: projectdiscovery
- Severity: high
- Cvss score: 7.5
- Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- Epss score: 0.00444
- Epss percentile: 0.39124
- Assignee: [email protected]
- Published at: 2026-06-28T02:16:32Z
- Age in days: 149
- Modified at: 2026-10-25T17:10:00Z
- References total: 2
- Products total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2026-58050
- Nvd status: analyzed
- Checked, none or zero: patch available, known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, oss, projects total, projects, rejected by nvd
- Not known: requirement type, hackerone
Cwe
| Id | Name |
|---|---|
| CWE-190 | Integer Overflow or Wraparound |
References
| Url | Source | Tags |
|---|---|---|
| https://www.vulncheck.com/advisories/libssh2-integer-overflow-in-publickey-subsystem-attribute-allocation | nvd | Third Party Advisory |
| https://github.com/libssh2/libssh2/blob/master/src/publickey.c | nvd | Product |
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| libssh2:libssh2 | <= 1.11.1 | no | nvd | /v1/products/libssh2/libssh2 |
Index
- Checked, none or zero: repositories, repositories high signal, packages
Exploitation
- Remote: yes
- Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, authentication required
- Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports, exposed hosts