Skip to main content

libssh2 CVE-2026-58050

| EUVDEUVD-2026-39970 HIGH
Integer Overflow or Wraparound (CWE-190)
2026-06-28 VulnCheck GHSA-mf77-5hj2-98w9
8.3
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Lure 32-bit client to malicious SSH server
  2. Delivery
    Client enters publickey subsystem exchange
  3. Exploit
    Server sends oversized 32-bit attribute count
  4. Execution
    Allocation integer-overflows to tiny buffer
  5. Persist
    Parsing loop writes past heap allocation
  6. Impact
    Heap corruption crashes or hijacks client

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Integer overflow checks
MITRE ATT&CK

1 technique across 1 tactic: Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires the victim libssh2 client (through 1.11.1) to initiate a connection to an attacker-controlled or compromised SSH server and to enter the publickey subsystem code path, and the client must be built for a 32-bit architecture so that num_attrs * sizeof(libssh2_publickey_attribute) overflows 32-bit size_t. The attacker needs no credentials on the client (PR:N) and no separate user click beyond the client establishing the SSH session, but the attack is bounded by AC:H factors: it does not work against 64-bit builds, it depends on the application actually exercising the publickey subsystem, and it requires steering the victim to the malicious server. These limiting factors - 32-bit-only, untrusted-server-required - substantially narrow real-world exposure below what the network attack vector alone implies.

Impact

The provided CVSS 4.0 vector (AV:N/AC:H/AT:N/PR:N/UI:N, VC:L/VI:L/VA:H, base 8.3) captures the key tension: the attack is network-reachable and needs no privileges, but AC:H reflects real constraints - the victim client must connect to an attacker-controlled SSH server and the target must be a 32-bit build for the multiplication to overflow, which excludes the now-dominant 64-bit deployments. Availability impact is High (memory corruption / crash) while confidentiality and integrity are only Low, consistent with a heap overflow whose reliable code-execution outcome is uncertain. Publicly available exploit code (VulnCheck-reported, with a GitHub PoC) raises practical risk, but there is no CISA KEV listing and no EPSS score supplied, so there is no evidence of widespread active exploitation - treat this as a credible, prove-able bug rather than a mass-exploited one. Net priority is moderate-to-high specifically for organizations running 32-bit clients (embedded/IoT, legacy systems) that initiate SSH connections to untrusted endpoints.

Exploit ScenarioDerived

An attacker stands up a malicious SSH server (or compromises one) and waits for or lures a 32-bit libssh2 client to connect, for example an automated backup or sync job that uses libcurl SCP. During the publickey exchange the server returns a crafted response with a huge 32-bit attribute count that overflows the allocation, and the subsequent attribute-parsing loop writes past the undersized heap buffer, crashing the client or potentially corrupting heap memory for code execution. A public PoC for this calculation already exists (github.com/bikini/exploitarium libssh2-publickey-list-calc-poc).

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 28, 2026

Heap buffer overflow in the libssh2 SSH client library (all versions through 1.11.1) lets a malicious or compromised SSH server corrupt memory in any connecting client on 32-bit platforms. The publickey subsystem reads an attacker-supplied 32-bit attribute count and multiplies it by the attribute structure size without bounds checking, so the allocation integer-overflows to an undersized buffer that the parsing loop then writes past. Publicly available exploit code exists; this is a CWE-190 integer overflow with no public exploit identified in CISA KEV, so it is not confirmed actively exploited.

RemediationAI

No vendor-released patched version is identified in the supplied data, so monitor the libssh2 project and the VulnCheck advisory (https://www.vulncheck.com/advisories/libssh2-integer-overflow-in-publickey-subsystem-attribute-allocation) for a tagged release that adds bounds checking to the num_attrs allocation, and upgrade as soon as it ships. As compensating controls until then: prefer 64-bit builds of libssh2 and any software linking it, since the overflow does not trigger on 64-bit size_t - the trade-off is that 32-bit-only embedded/legacy targets cannot adopt this and need replacement or rebuild. Restrict outbound SSH connections from libssh2-based clients to known, trusted hosts (host allowlisting or egress filtering) so a malicious server cannot be reached; the side effect is reduced flexibility for ad-hoc connections. Where possible, avoid or disable use of the publickey subsystem code path in applications that do not require it, accepting loss of that feature. Track and rebuild any first-party software that statically links libssh2 once a fix lands, since OS package updates will not cover statically embedded copies.

Affected VersionsENISA

libssh2 0 ≤1.11.1

Affected Packages

euvd libssh2 no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

libssh2 is a widely embedded client-side C library implementing the SSH2 protocol, used by tools such as curl/libcurl for SCP/SFTP and by many applications that programmatically open SSH sessions. The flaw lives in the publickey subsystem handler (src/publickey.c) where the server-returned response carries a 32-bit num_attrs value. That value feeds an allocation sized as num_attrs * sizeof(libssh2_publickey_attribute); on 32-bit (ILP32) targets the product wraps around the 32-bit size_t, returning a buffer far smaller than the loop expects. This is a textbook CWE-190 integer overflow leading to an undersized allocation and subsequent out-of-bounds heap writes during attribute parsing. Per the CPE cpe:2.3:a:libssh2:libssh2:*:*:*:*:*:*:*:* the issue is in the upstream library itself, so it transitively affects every product that statically or dynamically links a vulnerable libssh2 build on a 32-bit architecture.

Know when Libssh2 gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 8.3 HIGH
CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:L/VA:H/SC:N/SI:N/SA:N
vuln.today AI 7.0 HIGH

Network-reachable from a malicious server with no client credentials (PR:N), but AC:H because only 32-bit builds overflow and the victim must connect to the attacker; impact is mainly availability (heap corruption).

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:H
4.0 AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:L/VA:H/SC:N/SI:N/SA:N
SUSE 8.1 HIGH
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Red Hat 7.0 MEDIUM

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
High
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
Low
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

1
CVSS changed
Jun 28, 2026 - 02:22 NVD
7.0 (HIGH) 8.3 (HIGH)

DescriptionCVE.org

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.

Executive ViewAI

Why It Matters

libssh2 versions through 1.11.1 contain a heap buffer overflow vulnerability affecting 32-bit platforms when clients connect to SSH servers. An attacker controlling a malicious or compromised SSH server can corrupt client memory, potentially leading to code execution or system compromise. Publicly available exploit code exists; organizations must immediately identify and remediate 32-bit systems running vulnerable SSH clients.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: (1) restrict SSH connections to pre-authorized, trusted servers only; (2) prioritize upgrading 32-bit systems to 64-bit platforms; (3) implement network segmentation to limit SSH exposure; (4) deploy SSH connection monitoring and anomaly detection; (5) disable SSH access for non-critical systems if operationally feasible.

Threat Intelligence Overview

EPSS Score
0.3%
Top 77% exploitable
Prevalence
High
widely embedded SSH client library used by curl and many tools
Exploit
POC
Public exploit code exists
Social Media
2
Sightings
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment MSRC Vendor CIRCL GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Partial

Priority Score

62
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +42
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

Integer overflow occurs when an arithmetic operation produces a result that exceeds the maximum value a given integer type can store.

Related Vulnerabilities in libssh2 publickey-subsystem Memory Safety Flaws

View all 2
CVE-2023-48795 MEDIUM POC
5.9 Dec 18

The SSH transport protocol with certain OpenSSH extensions, found in OpenSSH before 9.6 and other products, allows remot

CVE-2026-55200 CRITICAL POC
9.2 Jun 17

Remote code execution in libssh2 through version 1.11.1 stems from an unchecked packet_length field in ssh2_transport_re

CVE-2019-17498 HIGH POC
8.1 Oct 21

In libssh2 v1.9.0 and earlier versions, the SSH_MSG_DISCONNECT logic in packet.c has an integer overflow in a bounds che

CVE-2025-15661 HIGH POC
8.3 Jun 18

Out-of-bounds heap read in libssh2 through 1.11.1 enables a malicious SFTP server or man-in-the-middle attacker to leak

CVE-2019-13115 HIGH POC
8.1 Jul 16

In libssh2 before 1.9.0, kex_method_diffie_hellman_group_exchange_sha256_key_exchange in kex.c has an integer overflow t

CVE-2019-3862 CRITICAL
9.1 Mar 21

An out of bounds read flaw was discovered in libssh2 before 1.8.1 in the way SSH_MSG_CHANNEL_REQUEST packets with an exi

CVE-2019-3855 HIGH
8.8 Mar 21

An integer overflow flaw which could lead to an out of bounds write was discovered in libssh2 before 1.8.1 in the way pa

CVE-2019-3858 CRITICAL
9.1 Mar 21

An out of bounds read flaw was discovered in libssh2 before 1.8.1 when a specially crafted SFTP packet is received from

CVE-2019-3859 CRITICAL
9.1 Mar 21

An out of bounds read flaw was discovered in libssh2 before 1.8.1 in the _libssh2_packet_require and _libssh2_packet_req

CVE-2019-3861 CRITICAL
9.1 Mar 25

An out of bounds read flaw was discovered in libssh2 before 1.8.1 in the way SSH packets with a padding length value gre

CVE-2019-3860 CRITICAL
9.1 Mar 25

An out of bounds read flaw was discovered in libssh2 before 1.8.1 in the way SFTP packets with empty payloads are parsed

Vendor StatusVendor

Debian

libssh2
Release Status Fixed Version Urgency
bullseye vulnerable 1.9.0-2+deb11u1 -
bookworm vulnerable 1.10.0-3 -
trixie vulnerable 1.11.1-1 -
trixie (security) vulnerable 1.11.1-1+deb13u1 -
forky, sid vulnerable 1.11.1-4 -
(unstable) fixed (unfixed) -

SUSE

Severity: Important
Product Status
SUSE Linux Enterprise Desktop 15 SP7 Affected
SUSE Linux Enterprise High Performance Computing 15 SP7 Affected
SUSE Linux Enterprise Micro 5.3 Affected
SUSE Linux Enterprise Micro 5.4 Affected
SUSE Linux Enterprise Micro 5.5 Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy