CVE-2025-8277Libssh: 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.
What to do
Fixed builds are available from AlmaLinux, Debian, Red Hat, Rocky Linux, Ubuntu: see the table below for the fixed version per release.
Red Hat, Ubuntu have not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 25.10 | libssh | Fixed | 0.11.2-1ubuntu0.2 | UBUNTU-CVE-2025-8277 |
| Ubuntu 24.04 | libssh | Fixed | 0.10.6-2ubuntu0.3 | UBUNTU-CVE-2025-8277 |
| Ubuntu 22.04 | libssh | Fixed | 0.9.6-2ubuntu0.22.04.6 | UBUNTU-CVE-2025-8277 |
| Ubuntu 20.04 | libssh | Fix pending | 0.9.3-2ubuntu2.5+esm3 (Ubuntu Pro) | UBUNTU-CVE-2025-8277 |
| Ubuntu 18.04 | libssh | Fix pending | 0.8.0~20170825.94fa1e38-1ubuntu0.7+esm6 (Ubuntu Pro) | UBUNTU-CVE-2025-8277 |
| Debian 14 | libssh | Fixed | 0.11.3-1 | DEBIAN-CVE-2025-8277 |
| Debian 13 | libssh | Fixed | 0.11.2-1+deb13u1 | DEBIAN-CVE-2025-8277 |
| Debian 12 | libssh | Fixed | 0.10.6-0+deb12u2 | DEBIAN-CVE-2025-8277 |
| Red Hat Enterprise Linux 10 | libssh | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | libssh-config | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | libssh-devel | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | libssh | Fixed | 0:0.10.4-18.el9 | RHSA-2026:18683 |
| Red Hat Enterprise Linux 9 | libssh-config | Fixed | 0:0.10.4-18.el9 | RHSA-2026:18683 |
| Red Hat Enterprise Linux 9 | libssh-devel | Fixed | 0:0.10.4-18.el9 | RHSA-2026:18683 |
| Red Hat Enterprise Linux 8 | libssh | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | libssh-config | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | libssh-devel | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 7 | libssh2 | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 7 | libssh2-devel | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 7 | libssh2-docs | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 6 | libssh2 | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | libssh2-devel | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | libssh2-docs | Will not fix Out of support scope | ||
| AlmaLinux 9 | libssh | Fixed | 0.10.4-18.el9 | ALSA-2026:18683 |
| AlmaLinux 9 | libssh-config | Fixed | 0.10.4-18.el9 | ALSA-2026:18683 |
| AlmaLinux 9 | libssh-devel | Fixed | 0.10.4-18.el9 | ALSA-2026:18683 |
| Rocky Linux 9 | libssh | Fixed | 0:0.10.4-18.el9 | RLSA-2026:18683 |
What the vendor says
As published in the CVE record by redhat, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- libssh: affected: 0.6.0 to before 0.11.3; fixed in
0.11.3 - Red Hat Enterprise Linux 9
- Red Hat Enterprise Linux 10
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
- Red Hat OpenShift Container Platform 4
Workaround: Mitigation for this issue is either not available or the currently available options don't meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability. It is strongly advised to apply updated libssh packages once available to prevent memory exhaustion risks on client systems.
Vendor advisories:
- https://access.redhat.com/errata/RHSA-2026:18683 (vendor-advisory)
References
- https://access.redhat.com/errata/RHSA-2026:18683
- https://access.redhat.com/security/cve/CVE-2025-8277
- https://bugzilla.redhat.com/show_bug.cgi?id=2383888
- https://www.libssh.org/security/advisories/CVE-2025-8277.txt
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.