Skip to main content
Meet us at Black Hat USA 2026— Las Vegas, August 1–6Book a Meeting
Mallory
Unrated

Integer Overflow in libssh2 publickey subsystem attribute allocation

IdentifiersCVE-2026-58050CWE-190

CVE-2026-58050 is a memory corruption vulnerability in libssh2 through 1.11.1 affecting the client-side handling of publickey-subsystem responses. libssh2 reads an attacker-controlled 32-bit attribute count from a server response and uses that value in the allocation expression num_attrs * sizeof(libssh2_publickey_attribute) without adequate bounds checking. On 32-bit platforms, this multiplication can overflow, resulting in an undersized heap allocation. A malicious SSH server can then cause the subsequent attribute-parsing loop to write beyond the allocated buffer, producing a heap buffer overflow in the connecting libssh2 client.

Share:
For your environment

Are you exposed to this one?

Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation can cause heap memory corruption in a libssh2 client connecting to a malicious SSH server. The likely outcomes include client crash and denial of service; because the flaw is a heap buffer overflow driven by attacker-controlled input, it may also enable arbitrary code execution in the client context, depending on platform, allocator behavior, and exploitability conditions.

Mitigation

If you can’t patch tonight, do this now.

Until patched versions are deployed, avoid using affected libssh2-based clients to connect to untrusted or potentially malicious SSH servers. Reduce exposure by restricting outbound SSH connections to trusted hosts, prioritizing migration away from 32-bit deployments where feasible, and monitoring affected clients for abnormal crashes that may indicate exploitation attempts.

Remediation

Patch, then assume compromise.

Upgrade libssh2 to a fixed release that adds proper bounds checking for the attacker-controlled attribute count and validates allocation size calculations before memory allocation and parsing. If a vendor-supplied patched version is available, deploy it across all affected libssh2-based applications, especially those running on 32-bit platforms.
PUBLIC EXPLOITS

Exploits

No public exploits tracked yet. Mallory keeps watching.

VALID 0 / 0 TOTALView more in app

No public exploit code observed for this vulnerability.

EXPOSURE SURFACE

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
Libssh2Libssh2application

Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.

What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence

Every observed campaign linking this CVE to a named adversary.

Associated malware

Malware families riding this exploit, with evidence and IOCs.

Detection signatures

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity10

Community discussion across Reddit, Mastodon, and other social sources.