CVE-2025-15661
JSON

8.3high

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

Severity
8.3high CVSS:4.0 by VulnCheck
Exploit likelihood
0.83% (higher than 58% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
VulnCheck

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.

Affected

Product or packageVersionsReported by
libssh2 libssh2up to 1.11.1
Not affected: 2dae3024897e1898d389835151f4e9606227721d
CVE List, NVD

All scores

VulnCheck8.3high CVSS:4.0CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:N/VA:H/SC:N/SI:N/SA:N
VulnCheck6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:H
NVD6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:H

Classification

CWE-125

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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.

NVD (es)

libssh2 hasta 1.11.1, corregido en el commit 2dae302, contiene una vulnerabilidad de lectura de heap fuera de límites en la función sftp_symlink() en src/sftp.c que permite a un servidor SSH malicioso o a un atacante man-in-the-middle divulgar el contenido de la memoria heap o causar un fallo enviando una respuesta SSH_FXP_NAME manipulada. Los atacantes pueden proporcionar un valor link_len mayor que los datos reales del paquete en las respuestas SSH_FXP_NAME para operaciones SFTP READLINK y REALPATH, lo que desencadena una sobrelectura del búfer heap de hasta target_len menos un bytes debido a la falta de validación del tamaño del búfer de paquete disponible antes de la operación memcpy.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-15661 changed 2026-11-10CVE Terms of Use
NVDCVE-2025-15661 changed 2026-11-10Public domain