Critical libssh2 Flaws Expose SSH Clients to RCE, DoS, and Memory Disclosure
Vulnerability Disclosure · 17 sources · Updated 5mo ago · First seen Jun 18, 2026

Multiple vulnerabilities in libssh2 have exposed SSH clients and products that embed the library to attacks from malicious or impersonated SSH servers. The most severe issue, CVE-2026-55200, is a pre-authentication out-of-bounds heap write in ssh2_transport_read() that affects all versions through 1.11.1 and could allow remote code execution, while CVE-2026-55199 can force clients into a CPU-intensive loop during key exchange and cause denial of service. The library is widely used in curl, backup software, IoT firmware, and network appliances, raising broad supply-chain risk, especially where libssh2 is statically linked or bundled into downstream products.
A separate flaw, CVE-2025-15661, affects sftp_symlink() in src/sftp.c and can be triggered during SFTP READLINK or REALPATH operations when a malicious server or man-in-the-middle sends a crafted SSH_FXP_NAME response with an oversized link_len value. That bug causes a heap buffer over-read that may disclose memory contents or crash applications. Fixes were reported in commits 97acf3d, 1762685, and 2dae302, but at the time of reporting no official libssh2 release containing the newer patches had been published, leaving downstream vendors responsible for shipping their own updates.
Why it matters
Summary
Multiple high-severity client-side libssh2 flaws affect versions through 1.11.1 and expose SSH, SCP, and SFTP clients to remote code execution, denial of service, memory disclosure, and additional memory corruption when connecting to malicious, compromised, or impersonated SSH servers. Exposure is broad because libssh2 is embedded directly or statically linked into Cargo, curl, Git, PHP, backup tools, CI/CD systems, IoT firmware, network appliances, and enterprise integrations, creating significant supply-chain and shadow-dependency risk.
Impact assessment
Who is affected
- Organizations using software that embeds libssh2, especially client-side SSH/SCP/SFTP functionality.
- Rust users running Cargo builds prior to Rust 1.96.1 because Cargo compiles in libssh2 in this release context.
- Environments with automation that connects to external SSH endpoints: backup jobs, deployment pipelines, CI/CD runners, orchestration platforms, cloud connectors, file transfer tools, and SFTP gateways.
- Embedded and appliance deployments are at elevated risk where libssh2 is statically linked and not visible to package managers.
Severity and business impact
- CVE-2026-55200 is critical and can potentially enable pre-authentication remote code execution on the client from a malicious SSH server with no credentials and no user interaction.
- CVE-2026-55199 can hang clients in a CPU-intensive loop during key exchange, causing operational disruption and failed automated jobs.
- CVE-2025-15661 can disclose heap memory or crash applications during SFTP READLINK or REALPATH operations.
- CVE-2026-58050 adds further client-side memory corruption risk in the publickey subsystem, especially on 32-bit platforms.
Scope and exploitation status
- Scope is widespread due to downstream bundling across common developer, enterprise, and embedded products.
- Public proof-of-concept material exists for CVE-2026-55200 and for publickey-subsystem exploitation paths associated with CVE-2026-58050-related behavior.
- Reporting is mixed on active exploitation: some sources state no confirmed in-the-wild exploitation for CVE-2026-55200, while one secondary report cites analyst claims of active exploitation. Treat exploitation risk as elevated because exploit material is public and patch adoption is fragmented.
- No official fixed libssh2 tagged release was consistently available at reporting time; downstream vendors were backporting patches, extending exposure windows.


