Skip to main content

libssh2 CVE-2026-58051

| EUVDEUVD-2026-39971 HIGH
Use of Uninitialized Resource (CWE-908)
2026-06-28 VulnCheck GHSA-c5f3-hwj2-xp5p
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 client to malicious SSH server
  2. Delivery
    Client negotiates publickey subsystem
  3. Exploit
    Server sends malformed publickey response
  4. Execution
    Parse failure reaches cleanup path
  5. Persist
    Free of uninitialized attrs pointer
  6. Impact
    Client memory corruption or crash

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Variable initialization
Exploitation Conditions

Exploitation requires that the victim is a libssh2 client (version ≤ 1.11.1) that initiates an SSH connection to a server the attacker controls or has compromised, and that the connection uses the publickey subsystem so the vulnerable list-growth code in publickey.c is exercised. The attacker must send a malformed publickey response crafted to cause a parse failure that reaches the cleanup path (libssh2_publickey_list_free) before the new list entry is initialized. Limiting factors: the attacker cannot reach a passive client - the victim must actively connect outbound to the malicious server; the publickey subsystem code path must be used; and AC:H reflects that steering the uninitialized attrs pointer to an attacker-useful value (beyond a crash) is difficult, so the most dependable impact is denial of service rather than guaranteed code execution.

Impact

This is a genuine, prioritize-worthy client-side risk because exploitation is network-reachable with no authentication (PR:N, UI:N) and public PoC code exists, but several signals temper it. The provided CVSS 4.0 vector (AV:N/AC:H/AT:N/PR:N/UI:N/VC:N/VI:L/VA:H) scores 8.3 (High) and emphasizes availability impact (VA:H) with limited integrity impact (VI:L) and explicitly no confidentiality impact (VC:N) - notable because the input Tags label this 'Information Disclosure,' which directly conflicts with VC:N; treat the information-disclosure characterization as unconfirmed and likely a tagging artifact rather than a demonstrated leak. AC:H reflects that the attacker must steer an uninitialized pointer to a useful value through a precisely malformed response, so reliable code execution is non-trivial while a denial-of-service crash is straightforward. The threat model is also inverted from typical server CVEs: the victim is the connecting client, so risk concentrates in software that initiates outbound SSH to untrusted or attacker-controlled servers. No EPSS score was supplied, and the issue is not in CISA KEV, so widespread automated exploitation is not currently indicated.

Exploit ScenarioDerived

An attacker stands up or compromises an SSH server and lures or coerces a libssh2-based client (for example an automation job, sync tool, or appliance) into connecting and negotiating the publickey subsystem. The server returns a deliberately malformed publickey response that forces a parse failure into the cleanup path, causing the client to free an uninitialized attrs pointer; publicly available PoC code demonstrates triggering this calc/cleanup flaw. With AC:H, the most reliable outcome is a client crash (DoS), while shaping the uninitialized pointer toward exploitable memory corruption is harder but conceivable.

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

Free of an uninitialized, attacker-influenceable pointer in libssh2 through 1.11.1 allows a malicious SSH server to corrupt memory in any connecting client that uses the publickey subsystem. The publickey list is grown via SSH2_REALLOC without zero-initializing new entries, so a server-induced parse failure that reaches the cleanup path causes libssh2_publickey_list_free to operate on an uninitialized attrs pointer. Publicly available exploit code exists (reported by VulnCheck); no public evidence of active exploitation, and it is not listed in CISA KEV.

RemediationAI

No vendor-released patched version is identified in the provided data; the references point to the upstream source file (src/publickey.c) and the VulnCheck advisory rather than a tagged release, so the released patched version is not independently confirmed - track the VulnCheck advisory (https://www.vulncheck.com/advisories/libssh2-free-of-uninitialized-pointer-in-publickey-list-cleanup) and the libssh2 project for a fixed tag above 1.11.1 and upgrade as soon as it ships, then rebuild and redeploy all downstream software linked against libssh2. Until a fix is available, the most effective compensating control is to avoid initiating libssh2-based SSH connections to untrusted or attacker-controlled servers and to pin clients to known-good, fingerprint-verified hosts, since the attack requires the client to connect to a malicious server (this limits flexibility where dynamic/unknown endpoints are needed). Where feasible, avoid or disable use of the publickey subsystem code path in client configurations, accepting the loss of that authentication feature, and apply strict host-key verification to reduce exposure to rogue servers.

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 C client library implementing the SSH2 protocol, used inside tools and runtimes such as curl, git, PHP's ssh2 extension, and numerous appliances and applications that initiate SSH connections. The flaw is classed as CWE-908 (Use of Uninitialized Resource): in src/publickey.c the client's publickey list is expanded with SSH2_REALLOC, but the newly allocated entry slots are not zeroed before parsing fills them in. If parsing of a server response fails partway through, control reaches the cleanup routine while one or more entries still contain indeterminate stack/heap garbage. libssh2_publickey_list_free then iterates and frees the attrs pointer of an entry that was never initialized, calling free() on an attacker-influenceable, uninitialized pointer value. The single affected CPE is cpe:2.3:a:libssh2:libssh2:*:*:*:*:*:*:*:* across all versions up to and including 1.11.1.

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 MEDIUM
CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:N/VI:L/VA:H/SC:N/SI:N/SA:N
vuln.today AI 6.5 MEDIUM

Network-reachable but victim must connect to a malicious server and attacker must shape an uninitialized pointer (AC:H); no auth (PR:N); primary impact is crash/DoS (A:H) with limited integrity, no confidentiality (C:N).

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:H
4.0 AV:N/AC:H/AT:N/PR:N/UI:N/VC:N/VI:L/VA:H/SC:N/SI:N/SA:N
SUSE 6.5 MEDIUM
AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:H
Red Hat 6.5 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
None
Vulnerable system: Integrity
Low
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Severity Changed
Jun 28, 2026 - 02:22 NVD
MEDIUM HIGH
CVSS changed
Jun 28, 2026 - 02:22 NVD
6.5 (MEDIUM) 8.3 (HIGH)

DescriptionCVE.org

libssh2 through 1.11.1 grows its publickey list with SSH2_REALLOC but does not zero-initialize new entries before parsing populates them, so a parse failure reaching the cleanup path leaves libssh2_publickey_list_free operating on an uninitialized entry. A malicious SSH server offering the publickey subsystem can use a malformed response to make cleanup free an uninitialized, attacker-influenceable attrs pointer in a connecting libssh2 client.

Executive ViewAI

Why It Matters

libssh2, a widely-used SSH protocol library, contains a memory corruption vulnerability (CVE-2026-58051, CVSS 8.3) triggered by malicious SSH servers connecting to vulnerable clients. Organizations using affected versions up to 1.11.1 face risk of data exfiltration or system compromise through compromised or attacker-controlled SSH infrastructure. Publicly available exploit code elevates risk during the window before vendor remediation.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: (1) restrict outbound SSH connections to whitelisted, trusted internal servers; (2) disable publickey subsystem authentication if supported by your SSH configuration; (3) implement network segmentation to limit systems capable of initiating SSH connections; (4) deploy enhanced monitoring and alerting on SSH connection attempts and failures; (5) check with application vendors for available security updates or version constraints.

Threat Intelligence Overview

EPSS Score
0.3%
Top 80% exploitable
Prevalence
High
widely embedded SSH client library (curl, git, PHP, many appliances)
Exploit
POC
Public exploit code exists
Social Media
1
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
Poc
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

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

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: Moderate
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