CVE-2021-3634 json
A flaw has been found in libssh in versions prior to 0.9.6.
published 2021-08-31 5 y ago modified 2026-06-17 4 mo ago also EUVD-2021-26935
- cvss
- 6.5
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 4.7%
- EPSS 4.7% chance of exploitation in 30 days, percentile 91%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- libssh libssh 0.9.6
- libssh Debian 14, Debian 13, Debian 12 0.9.6-1
debian advisories DEBIAN-CVE-2021-3634
- libssh Ubuntu 20.04 LTS 0.9.3-2ubuntu2.2
- libssh Ubuntu 22.04 LTS 0.9.6-1
ubuntu advisories UBUNTU-CVE-2021-3634
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- libssh RHEL 8 0.9.6-3.el8
- libssh-config RHEL 8 0.9.6-3.el8
red hat advisories RHSA-2022:2031
- libssh SLES for SAP 12 SP5, SLES 12 SP5, SLE Software Development Kit 12 SP5 0.9.8-3.12.2
- libssh SLES for SAP 15 SP3, SLES for SAP 15 SP2, SLES 15 SP3-LTSS +6 more 0.9.8-150200.13.3.1
suse advisories SUSE-SU-2024:0539-1SUSE-SU-2024:0525-1
- libssh openSUSE Tumbleweed 0.9.6-1.2
opensuse advisories openSUSE-SU-2024:10998-1
- libssh AlmaLinux 8 0.9.6-3.el8
- libssh-config AlmaLinux 8 0.9.6-3.el8
almalinux advisories ALSA-2022:2031
- libssh Rocky Linux 8 0.9.6-3.el8
rocky linux advisories RLSA-2022:2031
- libssh Alpine 3.24, Alpine 3.23, Alpine 3.22 +8 more 0.9.6-r0
alpine advisories ALPINE-CVE-2021-3634
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- libssh Arch Linux 0.9.6-1
arch linux advisories AVG-2324
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2021-3634 updated cvss 3.5
libssh: possible heap-based buffer overflow when rekeying
-
Red Hat Enterprise Linux 7 libssh Red Hat Virtualization 4 libsshaffected: no fix planned “Out of support scope”
-
Red Hat Enterprise Linux AppStream (v. 8) libssh-devel 0.9.6-3.el8, libssh-debuginfo 0.9.6-3.el8, libssh-debugsource 0.9.6-3.el8 Red Hat Enterprise Linux BaseOS (v. 8) libssh 0.9.6-3.el8, libssh-config 0.9.6-3.el8fixed: vendor fix RHSA-2022:2031
-
Red Hat Enterprise Linux 9 libssh, libssh-confignot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
4.68% chance of exploitation in the next 30 days, higher than 91% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 6.5 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| NVD | 2.0 | 4.0 | AV:N/AC:L/Au:S/C:N/I:N/A:P |
Affected products
- n/a libssh
Classification
- Weakness
-
- CWE-787 Out-of-bounds Write
References
-
oracle.com
/security-alerts/cpujan2022.html
patch, third-party-advisory
-
debian.org
/security/2021/dsa-4965
vendor-advisory, third-party-advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/SVWAAB2XMKEUMPMDALINKAA4U2QM4LNG/
vendor-advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/JKYD3ZRAMDAQX3ZW6THHUF3GXN7FF6B4/
vendor-advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/DRK67AJCWYYVAGF5SGAHNZXCX3PN3ZFP/
vendor-advisory
-
security.gentoo.org
/glsa/202312-05
vendor-advisory
-
bugzilla.redhat.com
/show_bug.cgi?id=1978810
issue-tracking, third-party-advisory
-
security.netapp.com
/advisory/ntap-20211004-0003/
third-party-advisory
Sources
- CVE List CVE-2021-3634
- NVD CVE-2021-3634
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.