CVE-2025-15661 libssh2 - Heap Buffer Over-read via sftp_symlink() in sftp.c

High 8.3 Published Updated

A malicious SSH server can trigger a heap buffer over-read in libssh2, potentially disclosing memory contents or causing a crash.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2025-15661?

CVE-2025-15661 is a high-severity vulnerability in libssh2, published on 18 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

libssh2 through 1.11.1, fixed in commit 2dae302, contains an out-of-bounds heap read vulnerability in the sftp_symlink() function in src/sftp.c that allows a malicious SSH server or man-in-the-middle attacker to disclose heap memory contents or cause a crash by sending a crafted SSH_FXP_NAME response. Attackers can supply a link_len value larger than the actual packet data in SSH_FXP_NAME responses for SFTP READLINK and REALPATH operations, triggering a heap buffer over-read of up to target_len minus one bytes due to the missing validation of available packet buffer size before the memcpy operation.

Weakness: CWE-125

Which versions are affected by CVE-2025-15661?

It affects 1 product.

Linux distribution packages (3)
libssh2 Red Hat:hummingbird:1All versions0:1.11.1-9.hum1
libssh2-devel Red Hat:hummingbird:1All versions0:1.11.1-9.hum1
libssh2-docs Red Hat:hummingbird:1All versions0:1.11.1-9.hum1

Products include Libssh2 Libssh2.

How do I fix CVE-2025-15661?

Apply the vendor's patch.

Is CVE-2025-15661 being exploited?

There is no known exploitation of CVE-2025-15661 in the wild and no public exploit code.

Sources

Also known as ALPINE-CVE-2025-15661, AZL-90936, BELL-CVE-2025-15661, DEBIAN-CVE-2025-15661, ECHO-16dd-65e4-250c, GHSA-3wqh-87fg-ffgg and 5 more.

Is CVE-2025-15661 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free