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.
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
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux:9 | libssh | 0.10.4-18.el9 | ALSA-2026:18683 |
| AlmaLinux:9 | libssh-config | 0.10.4-18.el9 | ALSA-2026:18683 |
| AlmaLinux:9 | libssh-devel | 0.10.4-18.el9 | ALSA-2026:18683 |
| Debian:12 | libssh | 0.10.6-0+deb12u2 | DEBIAN-CVE-2025-8277 |
| Debian:13 | libssh | 0.11.2-1+deb13u1 | DEBIAN-CVE-2025-8277 |
| Debian:14 | libssh | 0.11.3-1 | DEBIAN-CVE-2025-8277 |
| Rocky Linux:9 | libssh | 0:0.10.4-18.el9 | RLSA-2026:18683 |
| Ubuntu:22.04:LTS | libssh | 0.9.6-2ubuntu0.22.04.6 | USN-8051-1 |
| Ubuntu:22.04:LTS | libssh | 0.9.6-2ubuntu0.22.04.6 | UBUNTU-CVE-2025-8277 |
| Ubuntu:24.04:LTS | libssh | 0.10.6-2ubuntu0.3 | USN-8051-1 |
| Ubuntu:24.04:LTS | libssh | 0.10.6-2ubuntu0.3 | UBUNTU-CVE-2025-8277 |
| Ubuntu:25.10 | libssh | 0.11.2-1ubuntu0.2 | UBUNTU-CVE-2025-8277 |
| Ubuntu:25.10 | libssh | 0.11.2-1ubuntu0.2 | USN-8051-1 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| libssh | 0.6.0 – before 0.11.3 | |
| Red Hat | Red Hat Enterprise Linux 9 | see references |
| Red Hat | Red Hat Enterprise Linux 9 | see references |
| Red Hat | Red Hat Enterprise Linux 10 | see references |
| Red Hat | Red Hat Enterprise Linux 6 | see references |
| Red Hat | Red Hat Enterprise Linux 7 | see references |
| Red Hat | Red Hat Enterprise Linux 8 | see references |
| Red Hat | Red Hat OpenShift Container Platform 4 | see references |
| Red Hat | Red Hat OpenShift Container Platform 4 | see references |
Weakness: CWE-401 · Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:L
References
- RHSA-2026:18683 vendor-advisory, x_refsource_REDHAT
- https://access.redhat.com/security/cve/CVE-2025-8277 vdb-entry, x_refsource_REDHAT
- RHBZ#2383888 issue-tracking, x_refsource_REDHAT
- https://www.libssh.org/security/advisories/CVE-2025-8277.txt