Description
A flaw has been found in libssh in versions prior to 0.9.6. The SSH protocol keeps track of two shared secrets during the lifetime of the session. One of them is called secret_hash and the other session_id. Initially, both of them are the same, but after key re-exchange, previous session_id is kept and used as an input to new secret_hash. Historically, both of these buffers had shared length variable, which worked as long as these buffers were same. But the key re-exchange operation can also change the key exchange method, which can be based on hash of different size, eventually creating "secret_hash" of different size than the session_id has. This becomes an issue when the session_id memory is zeroed or when it is used again during second key re-exchange.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| — | libssh | libssh 0.9.6 | — |
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.9.6-1 | — |
| Debian 13 | libssh | 0.9.6-1 | — |
| Debian 12 | libssh | 0.9.6-1 | — |
| Debian 11 | libssh | 0.9.5-1+deb11u1 | DSA-4965-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 22.04 LTS | libssh | 0.9.6-1 | — |
| Ubuntu 20.04 LTS | libssh | 0.9.3-2ubuntu2.2 | USN-5053-1 |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 8 | libssh +2 | 0.9.6-3.el8 | RHSA-2022:2031 |
AlmaLinux
Errata ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux 8 | libssh +2 | 0.9.6-3.el8 | ALSA-2022:2031 |
Rocky Linux
Errata ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Rocky Linux 8 | libssh | 0.9.6-3.el8 | RLSA-2022:2031 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 15 SP3 | libssh | 0.9.8-150200.13.3.1 | SUSE-SU-2024:0525-1 |
| SLES 15 SP2 | libssh | 0.9.8-150200.13.3.1 | SUSE-SU-2024:0525-1 |
| SLES 12 SP5 | libssh | 0.9.8-3.12.2 | SUSE-SU-2024:0539-1 |
Show 8 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES for SAP 15 SP3 | libssh | 0.9.8-150200.13.3.1 | SUSE-SU-2024:0525-1 |
| SLES for SAP 15 SP2 | libssh | 0.9.8-150200.13.3.1 | SUSE-SU-2024:0525-1 |
| SLES for SAP 12 SP5 | libssh | 0.9.8-3.12.2 | SUSE-SU-2024:0539-1 |
| SLE Micro 5.2 | libssh | 0.9.8-150200.13.3.1 | SUSE-SU-2024:0525-1 |
| SLE Micro 5.1 | libssh | 0.9.8-150200.13.3.1 | SUSE-SU-2024:0525-1 |
| SLE HPC 15 SP3 | libssh | 0.9.8-150200.13.3.1 | SUSE-SU-2024:0525-1 |
| SLE HPC 15 SP2 | libssh | 0.9.8-150200.13.3.1 | SUSE-SU-2024:0525-1 |
| SUSE Enterprise Storage 7.1 | libssh | 0.9.8-150200.13.3.1 | SUSE-SU-2024:0525-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | libssh | 0.9.6-1.2 | openSUSE-SU-2024:10998-1 |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.24 | libssh | 0.9.6-r0 | — |
| Alpine v3.23 | libssh | 0.9.6-r0 | — |
| Alpine v3.22 | libssh | 0.9.6-r0 | — |
| Alpine v3.21 | libssh | 0.9.6-r0 | — |
| Alpine v3.20 | libssh | 0.9.6-r0 | — |
Show 6 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.19 | libssh | 0.9.6-r0 | — |
| Alpine v3.18 | libssh | 0.9.6-r0 | — |
| Alpine v3.17 | libssh | 0.9.6-r0 | — |
| Alpine v3.16 | libssh | 0.9.6-r0 | — |
| Alpine v3.15 | libssh | 0.9.6-r0 | — |
| Alpine v3.14 | libssh | 0.9.6-r0 | — |
Oracle Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Oracle Linux 8 | libssh +2 | 0.9.6-3.el8 | ELSA-2022-2031 |
Advisories 11
- ALSA-2022:2031 Low: libssh security, bug fix, and enhancement update AlmaLinux Security Advisories · Oct 29, 2026
- RHSA-2022:2031 Red Hat Security Advisory: libssh security, bug fix, and enhancement update Red Hat Security Advisories (RHSA) · Jun 26, 2026
- USN-5053-1 libssh vulnerability Ubuntu Security Notices (USN) · Apr 22, 2026
- DSA-4965-1 libssh - security update Debian Security (DSA / DLA) · Mar 9, 2026
- RLSA-2022:2031 Low: libssh security, bug fix, and enhancement update Rocky Linux Security Advisories · Feb 5, 2026
- openSUSE-SU-2024:10998-1 libssh-config-0.9.6-1.2 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:0539-1 Security update for libssh SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:0525-1 Security update for libssh SUSE / openSUSE Security Updates · Feb 4, 2026
- WID-SEC-2024-3377 Dell PowerProtect Data Domain: Mehrere Schwachstellen BSI CERT-Bund (WID) · Oct 12, 2025
- WID-SEC-2022-0001 libssh: Schwachstelle ermöglicht Umgehen von Sicherheitsvorkehrungen BSI CERT-Bund (WID) · May 7, 2024
- ELSA-2022-2031 Low: libssh security, bug fix, and enhancement update (Oracle Linux 8) Oracle Linux Security Advisories (ELSA) · May 17, 2022
References
- https://bugzilla.redhat.com/show_bug.cgi?id=1978810
- DSA-4965 vendor-advisory
- FEDORA-2021-ec797b6a96 vendor-advisory
- FEDORA-2021-288925ac19 vendor-advisory
- FEDORA-2021-f2a020a065 vendor-advisory
- https://www.oracle.com/security-alerts/cpujan2022.html
- https://security.netapp.com/advisory/ntap-20211004-0003/
- GLSA-202312-05 vendor-advisory