CVE-2025-8277
published 2025-09-09CVE-2025-8277: A flaw was found in libssh's handling of key exchange (KEX) processes when a client repeatedly sends incorrect KEX guesses. The library fails to free memory…
PriorityP412low3.1CVSS 3.1
AVNACHPRLUINSUCNINAL
EPSS
0.38%
30.1th percentile
A flaw was found in libssh's handling of key exchange (KEX) processes when a client repeatedly sends incorrect KEX guesses. The library fails to free memory during these rekey operations, which can gradually exhaust system memory. This issue can lead to crashes on the client side, particularly when using libgcrypt, which impacts application stability and availability.
Affected
21 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| debian | libssh | < libssh 0.10.6-0+deb12u2 (bookworm) | libssh 0.10.6-0+deb12u2 (bookworm) |
| libssh | libssh | >= 0 < 0.9.8-0+deb11u2 | 0.9.8-0+deb11u2 |
| libssh | libssh | >= 0 < 0.10.6-0+deb12u2 | 0.10.6-0+deb12u2 |
| libssh | libssh | >= 0 < 0.11.2-1+deb13u1 | 0.11.2-1+deb13u1 |
| libssh | libssh | >= 0 < 0.11.3-1 | 0.11.3-1 |
| libssh | libssh | >= 0 < 0.9.6-2ubuntu0.22.04.6 | 0.9.6-2ubuntu0.22.04.6 |
| libssh | libssh | >= 0 < 0.10.6-2ubuntu0.3 | 0.10.6-2ubuntu0.3 |
| libssh | libssh | >= 0 < 0.11.2-1ubuntu0.2 | 0.11.2-1ubuntu0.2 |
| libssh | libssh | >= 0 < 0.6.3-4.3ubuntu0.6+esm4 | 0.6.3-4.3ubuntu0.6+esm4 |
| libssh | libssh | >= 0 < 0.8.0~20170825.94fa1e38-1ubuntu0.7+esm6 | 0.8.0~20170825.94fa1e38-1ubuntu0.7+esm6 |
| libssh | libssh | >= 0 < 0.9.3-2ubuntu2.5+esm3 | 0.9.3-2ubuntu2.5+esm3 |
| msrc | azl3_libssh_0.10.6-2_on_azure_linux_3.0 | — | — |
| msrc | azl3_libssh_0.10.6-3_on_azure_linux_3.0 | — | — |
| msrc | azl3_libssh_0.10.6-4_on_azure_linux_3.0 | — | — |
| msrc | cbl2_libssh_0.10.6-2_on_cbl_mariner_2.0 | — | — |
| msrc | cbl2_libssh_0.10.6-3_on_cbl_mariner_2.0 | — | — |
| msrc | cbl2_libssh_0.10.6-5_on_cbl_mariner_2.0 | — | — |
| msrc | cbl2_python-gevent_21.1.2-3_on_cbl_mariner_2.0 | — | — |
| msrc | cbl_mariner_1.0_arm | — | — |
| msrc | cbl_mariner_1.0_x64 | — | — |
| msrc | cm1_c-ares_1.17.1-1_on_cbl_mariner_1.0 | — | — |
CVSS provenance
nvdv3.13.1LOWCVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:L
osv3.1LOW
vendor_msrc7.5HIGH
vendor_debian3.1LOW
vendor_redhat3.1LOW
vendor_ubuntu3.1LOW
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
OSV
libssh vulnerabilities
osv·2026-02-23·CVSS 3.1
CVE-2025-8277 [LOW] libssh vulnerabilities
libssh vulnerabilities
USN-8051-1 fixed vulnerabilities in libssh. This update provides the
corresponding updates for Ubuntu 16.04 LTS, Ubuntu 18.04 LTS, and Ubuntu
20.04 LTS.
Original advisory details:
It was discovered that libssh clients incorrectly handled the key exchange
process. A remote attacker could possibly use this issue to cause libssh
clients to crash, resulting in a denial of service. (CVE-2025-8277)
It was discovered that the libssh SCP client incorrectly sanitized paths
received from servers. A remote attacker could use this issue to cause
libssh SCP clients to overwrite files outside of the working directory and
possibly execute arbitrary code. (CVE-2026-0964)
It was discovered that libssh incorrectly handled parsing configuration
files. A local attacker could possib
OSV
libssh vulnerabilities
osv·2026-02-18·CVSS 3.1
CVE-2025-8277 [LOW] libssh vulnerabilities
libssh vulnerabilities
It was discovered that libssh clients incorrectly handled the key exchange
process. A remote attacker could possibly use this issue to cause libssh
clients to crash, resulting in a denial of service. (CVE-2025-8277)
It was discovered that the libssh SCP client incorrectly sanitized paths
received from servers. A remote attacker could use this issue to cause
libssh SCP clients to overwrite files outside of the working directory and
possibly execute arbitrary code. (CVE-2026-0964)
It was discovered that libssh incorrectly handled parsing configuration
files. A local attacker could possibly use this issue to cause libssh to
access non-regular files, resulting in a denial of service. (CVE-2026-0965)
It was discovered that libssh incorrectly handled the ssh_get_hexa()
OSV
CVE-2025-8277: A flaw was found in libssh's handling of key exchange (KEX) processes when a client repeatedly sends incorrect KEX guesses
osv·2025-09-09·CVSS 3.1
CVE-2025-8277 [LOW] CVE-2025-8277: A flaw was found in libssh's handling of key exchange (KEX) processes when a client repeatedly sends incorrect KEX guesses
A flaw was found in libssh's handling of key exchange (KEX) processes when a client repeatedly sends incorrect KEX guesses. The library fails to free memory during these rekey operations, which can gradually exhaust system memory. This issue can lead to crashes on the client side, particularly when using libgcrypt, which impacts application stability and availability.
GHSA
GHSA-39mw-228p-wr6v: A flaw was found in libssh's handling of key exchange (KEX) processes when a client repeatedly sends incorrect KEX guesses
ghsa_unreviewed·2025-09-09
CVE-2025-8277 [LOW] CWE-401 GHSA-39mw-228p-wr6v: A flaw was found in libssh's handling of key exchange (KEX) processes when a client repeatedly sends incorrect KEX guesses
A flaw was found in libssh's handling of key exchange (KEX) processes when a client repeatedly sends incorrect KEX guesses. The library fails to free memory during these rekey operations, which can gradually exhaust system memory. This issue can lead to crashes on the client side, particularly when using libgcrypt, which impacts application stability and availability.
Ubuntu
libssh vulnerabilities
vendor_ubuntu·2026-02-23·CVSS 3.1
CVE-2026-0965 [LOW] libssh vulnerabilities
Title: libssh vulnerabilities
Summary: Several security issues were fixed in libssh.
USN-8051-1 fixed vulnerabilities in libssh. This update provides the
corresponding updates for Ubuntu 16.04 LTS, Ubuntu 18.04 LTS, and Ubuntu
20.04 LTS.
Original advisory details:
It was discovered that libssh clients incorrectly handled the key exchange
process. A remote attacker could possibly use this issue to cause libssh
clients to crash, resulting in a denial of service. (CVE-2025-8277)
It was discovered that the libssh SCP client incorrectly sanitized paths
received from servers. A remote attacker could use this issue to cause
libssh SCP clients to overwrite files outside of the working directory and
possibly execute arbitrary code. (CVE-2026-0964)
It was discovered that libssh incorrectly han
Ubuntu
libssh vulnerabilities
vendor_ubuntu·2026-02-18·CVSS 3.1
CVE-2026-0965 [LOW] libssh vulnerabilities
Title: libssh vulnerabilities
Summary: Several security issues were fixed in libssh.
It was discovered that libssh clients incorrectly handled the key exchange
process. A remote attacker could possibly use this issue to cause libssh
clients to crash, resulting in a denial of service. (CVE-2025-8277)
It was discovered that the libssh SCP client incorrectly sanitized paths
received from servers. A remote attacker could use this issue to cause
libssh SCP clients to overwrite files outside of the working directory and
possibly execute arbitrary code. (CVE-2026-0964)
It was discovered that libssh incorrectly handled parsing configuration
files. A local attacker could possibly use this issue to cause libssh to
access non-regular files, resulting in a denial of service. (CVE-2026-0965)
It wa
Microsoft
Libssh: memory exhaustion via repeated key exchange in libssh
vendor_msrc·2025-09-09·CVSS 3.1
CVE-2025-8277 [LOW] CWE-401 Libssh: memory exhaustion via repeated key exchange in libssh
Libssh: memory exhaustion via repeated key exchange in libssh
FAQ: Is Azure Linux the only Microsoft product that includes this open-source library and is therefore potentially affected by this vulnerability?
One of the main benefits to our customers who choose to use the Azure Linux distro is the commitment to keep it up to date with the most recent and most secure versions of the open source libraries with which the distro is composed. Microsoft is committed to transparency in this work which is why we began publishing CSAF/VEX in October 2025. See this blog post for more information. If impact to additional products is identified, we will update the CVE to reflect this.
Mariner: Mariner
redhat: redhat
Customer Action Required: Yes
Remediation: CBL-Mariner Releases
Reference: https
Red Hat
libssh: Memory Exhaustion via Repeated Key Exchange in libssh
vendor_redhat·2025-09-09·CVSS 3.1
CVE-2025-8277 [LOW] CWE-401 libssh: Memory Exhaustion via Repeated Key Exchange in libssh
libssh: Memory Exhaustion via Repeated Key Exchange in libssh
A flaw was found in libssh's handling of key exchange (KEX) processes when a client repeatedly sends incorrect KEX guesses. The library fails to free memory during these rekey operations, which can gradually exhaust system memory. This issue can lead to crashes on the client side, particularly when using libgcrypt, which impacts application stability and availability.
A flaw was found in libssh's handling of key exchange (KEX) processes when a client repeatedly sends incorrect KEX guesses. The library fails to free memory during these rekey operations, which can gradually exhaust system memory. This issue can lead to crashes on the client side, particularly when using libgcrypt, which impacts application stability and availabi
Debian
CVE-2025-8277: libssh - A flaw was found in libssh's handling of key exchange (KEX) processes when a cli...
vendor_debian·2025·CVSS 3.1
CVE-2025-8277 [LOW] CVE-2025-8277: libssh - A flaw was found in libssh's handling of key exchange (KEX) processes when a cli...
A flaw was found in libssh's handling of key exchange (KEX) processes when a client repeatedly sends incorrect KEX guesses. The library fails to free memory during these rekey operations, which can gradually exhaust system memory. This issue can lead to crashes on the client side, particularly when using libgcrypt, which impacts application stability and availability.
Scope: local
bookworm: resolved (fixed in 0.10.6-0+deb12u2)
bullseye: resolved (fixed in 0.9.8-0+deb11u2)
forky: resolved (fixed in 0.11.3-1)
sid: resolved (fixed in 0.11.3-1)
trixie: resolved (fixed in 0.11.2-1+deb13u1)
Microsoft
A Node.js application that allows an attacker to trigger a DNS request for a host of their choice could trigger a Denial of Service in versions < 15.2.1 < 14.15.1 and < 12.19.1 by getting the applicat
vendor_msrc·2020-11-10·CVSS 7.5
CVE-2020-8277 [HIGH] CWE-400 A Node.js application that allows an attacker to trigger a DNS request for a host of their choice could trigger a Denial of Service in versions < 15.2.1 < 14.15.1 and < 12.19.1 by getting the applicat
A Node.js application that allows an attacker to trigger a DNS request for a host of their choice could trigger a Denial of Service in versions Is Azure Linux the only Microsoft product that includes this open-source library and is therefore potentially affected by this vulnerability?
One of the main benefits to our customers who choose to use the Azure Linux distro is the commitment to keep it up to date with the most recent and most secure versions of the open source libraries with which the distro is composed. Microsoft is committed to transparency in this work which is why we began publishing CSAF/VEX in October 2025. See this blog post for more information. If impact to additional products is identified, we will update the CVE to reflect this.
Mariner: Mariner
hackerone: hackerone
No detection rules found.
No public exploits indexed.
Bugzilla
CVE-2025-8277 mingw-libssh2: Memory Exhaustion via Repeated Key Exchange in libssh [fedora-42]
bugzilla·2025-09-09·CVSS 3.1
CVE-2025-8277 [LOW] CVE-2025-8277 mingw-libssh2: Memory Exhaustion via Repeated Key Exchange in libssh [fedora-42]
CVE-2025-8277 mingw-libssh2: Memory Exhaustion via Repeated Key Exchange in libssh [fedora-42]
Disclaimer: Community trackers are created by Red Hat Product Security team on a best effort basis. Package maintainers are required to ascertain if the flaw indeed affects their package, before starting the update process.
The following link provides references to all essential vulnerability management information. If something is wrong or missing, please contact a member of PSIRT.
https://spaces.redhat.com/display/PRODSEC/Vulnerability+Management+-+Essential+Documents+for+Engineering+Teams
Discussion:
This message is a reminder that Fedora Linux 42 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 42 on 2026-05-13.
It is Fedora's policy to close a
Bugzilla
CVE-2025-8277 libssh: Memory Exhaustion via Repeated Key Exchange in libssh
bugzilla·2025-07-28·CVSS 3.1
CVE-2025-8277 [LOW] CVE-2025-8277 libssh: Memory Exhaustion via Repeated Key Exchange in libssh
CVE-2025-8277 libssh: Memory Exhaustion via Repeated Key Exchange in libssh
Memory Exhaustion vulnerability in the key exchange logic of the libssh library. When an authenticated client repeatedly performs rekeying with incorrect first_kex_packet_follows guesses, libssh allocates new ephemeral key pairs without freeing old ones stored in session->next_crypto. Over time, this results in a memory leak that can exhaust system memory and cause a client-side denial-of-service (DoS). This flaw affects several KEX algorithms (Curve25519, ECDH, sntrup761x25519, DH-GEX) across multiple crypto backends (libgcrypt, OpenSSL, mbedTLS). The issue requires an authenticated client and does not impact the server side.
Versions Affected : libssh >= 0.6.0
Discussion:
Version affected : libssh >= 0.6.0, <=
2025-09-09
Published