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

Published Jun 18, 2026
·
Updated

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

Other sources

libssh2 through 1.11.1, fixed in commit 2dae302, contains an out-of-bounds heap read vulnerability in the sftpsymlink() 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 SSHFXPNAME response. Attackers can supply a linklen value larger than the actual packet data in SSHFXPNAME responses for SFTP READLINK and REALPATH operations, triggering a heap buffer over-read of up to targetlen minus one bytes due to the missing validation of available packet buffer size before the memcpy operation.

— Ubuntu

Affected Software

11 affected componentsFixes available
libssh2 libssh2<=1.11.1
Microsoft azl3 libssh2 1.11.1-3<1.11.1-4
1.11.1-4
Microsoft azl3 libssh2 1.11.1-4<1.11.1-4
1.11.1-4
libssh2 libssh2<=1.11.1
debian/libssh2<=1.10.0-3
1.10.0-3+deb12u11.11.1-1+deb13u21.11.1-1+deb13u11.11.1-6
alpine/chromium-rust<1.96.1-r0
1.96.1-r0
alpine/libssh2<1.11.1-r3
1.11.1-r3
alpine/libssh2<1.11.1-r3
1.11.1-r3
alpine/libssh2<1.11.1-r4
1.11.1-r4
alpine/libssh2<1.11.1-r4
1.11.1-r4
alpine/rust<1.96.1-r0
1.96.1-r0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 1.11.1-4
  2. Upgrade

    Upgrade debian/libssh2 to a version that resolves this vulnerability.

    Fixed in 1.10.0-3+deb12u1Fixed in 1.11.1-1+deb13u2Fixed in 1.11.1-1+deb13u1Fixed in 1.11.1-6
  3. Upgrade

    Upgrade alpine/chromium-rust to a version that resolves this vulnerability.

    Fixed in 1.96.1-r0
  4. Upgrade

    Upgrade alpine/libssh2 to a version that resolves this vulnerability.

    Fixed in 1.11.1-r3
  5. Upgrade

    Upgrade alpine/libssh2 to a version that resolves this vulnerability.

    Fixed in 1.11.1-r4
  6. Upgrade

    Upgrade alpine/rust to a version that resolves this vulnerability.

    Fixed in 1.96.1-r0
  7. Upgrade

    Upgrade libssh2 to a version that resolves this vulnerability.

    Patch 2dae302

Event History

Jun 18, 2026
CVE Published
via Ubuntu·12:00 AM
Data Sourced
via Ubuntu·12:00 AM
RemedyDescriptionSeverityAffected Software
CVE Published
via MITRE·08:18 PM
Data Sourced
via MITRE·08:18 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·09:16 PM
RemedyDescriptionSeverityWeaknessAffected Software
Data Sourced
via OSV·09:16 PM
DescriptionSeverityAffected Software
Jun 27, 2026
Data Sourced
via Microsoft·08:09 AM
DescriptionSeverityWeaknessAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Peer vulnerabilities

Found alongside the following vulnerabilities.

Frequently Asked Questions

1

What is the severity of CVE-2025-15661?

CVE-2025-15661 has a medium severity rating of 6.5.

2

What is the risk level of CVE-2025-15661?

CVE-2025-15661 has a risk level of 45.

3

How do I fix CVE-2025-15661?

To fix CVE-2025-15661, you should update libssh2 to version 1.11.2 or later.

4

What kind of vulnerability is CVE-2025-15661?

CVE-2025-15661 is a heap buffer over-read vulnerability in the sftp_symlink() function.

5

Who can exploit CVE-2025-15661?

CVE-2025-15661 can be exploited by a malicious SSH server or a man-in-the-middle attacker.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203