Vulnerability · Published Sep 9, 2025 · Assigned by redhat

CVE-2025-8277Libssh: memory exhaustion via repeated key exchange in libssh

Low 3.1

In plain English

A low-severity memory leak in libssh. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.4% (higher than 38% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)3.1Low
Exploit odds (30 days)0.4%top 62.4% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

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 packages & fixed versions

EcosystemPackageFixed inAdvisory
AlmaLinux:9libssh0.10.4-18.el9ALSA-2026:18683
AlmaLinux:9libssh-config0.10.4-18.el9ALSA-2026:18683
AlmaLinux:9libssh-devel0.10.4-18.el9ALSA-2026:18683
Debian:12libssh0.10.6-0+deb12u2DEBIAN-CVE-2025-8277
Debian:13libssh0.11.2-1+deb13u1DEBIAN-CVE-2025-8277
Debian:14libssh0.11.3-1DEBIAN-CVE-2025-8277
Rocky Linux:9libssh0:0.10.4-18.el9RLSA-2026:18683
Ubuntu:22.04:LTSlibssh0.9.6-2ubuntu0.22.04.6USN-8051-1
Ubuntu:22.04:LTSlibssh0.9.6-2ubuntu0.22.04.6UBUNTU-CVE-2025-8277
Ubuntu:24.04:LTSlibssh0.10.6-2ubuntu0.3USN-8051-1
Ubuntu:24.04:LTSlibssh0.10.6-2ubuntu0.3UBUNTU-CVE-2025-8277
Ubuntu:25.10libssh0.11.2-1ubuntu0.2UBUNTU-CVE-2025-8277
Ubuntu:25.10libssh0.11.2-1ubuntu0.2USN-8051-1

Affected products (as reported)

Weakness: CWE-401 · Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:L

References