Description
The publickey_from_privatekey function in libssh before 0.5.4, when no algorithm is matched during negotiations, allows remote attackers to cause a denial of service (NULL pointer dereference and crash) via a "Client: Diffie-Hellman Key Exchange Init" packet.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | libssh | 0.5.4-1 | — |
| Debian 13 | libssh | 0.5.4-1 | — |
| Debian 12 | libssh | 0.5.4-1 | — |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | libssh | 0.7.2-2.1 | openSUSE-SU-2024:10036-1 |
Advisories 2
- openSUSE-SU-2024:10036-1 libssh-devel-0.7.2-2.1 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
- WID-SEC-2024-1058 libssh: Schwachstelle ermöglicht Denial Of Service BSI CERT-Bund (WID) · May 7, 2024
References
- FEDORA-2013-1407 vendor-advisory
- libssh-publickeyfromprivatekey-dos(81595) vdb-entry
- 51982 third-party-advisory
- FEDORA-2013-1422 vendor-advisory
- USN-1707-1 vendor-advisory
- http://www.libssh.org/2013/01/22/libssh-0-5-4-security-release/