CVE-2025-8277 Libssh: memory exhaustion via repeated key exchange in libssh
A remote attacker can cause client-side memory exhaustion and application crashes by repeatedly sending incorrect key exchange guesses to a libssh client.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2025-8277?
CVE-2025-8277 is a low-severity denial of service vulnerability in Red Hat Enterprise Linux 10, published on 9 Sep 2025. Any signed-in user can exploit it over the network, with no action from the victim.
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.
Weakness: CWE-401
Which versions are affected by CVE-2025-8277?
Linux distribution packages (1)
libssh SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 | All versions | 0.6.3-12.18.1 |
How do I fix CVE-2025-8277?
Apply the vendor's patch.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2025-8277 being exploited?
There is no known exploitation of CVE-2025-8277 in the wild and no public exploit code.
Sources
Also known as AZL-67092, AZL-67095, BELL-CVE-2025-8277, DEBIAN-CVE-2025-8277, GHSA-39mw-228p-wr6v, OESA-2025-2342 and 2 more.