cve.bz

CVE-2021-3634 Out-of-bounds Write

6.5 mediumEPSS 4.7%Fix available

Medium (6.5). EPSS 4.7% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 3.1

6.5 medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
EPSS
4.7% (unchanged from 4.7% a week ago; 4.7% 30 days ago) estimated probability of exploitation activity in the next 30 days; 92nd percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-787 Out-of-bounds Write
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2021-3634 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-3634?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-3634?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-3634 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
libssh:libsshfrom 0.9.1 before 0.9.6
redhat:virtualization4.0
redhat:enterprise_linux8.0
debian:debian_linux10.0
debian:debian_linux11.0
fedoraproject:fedora33
fedoraproject:fedora34
fedoraproject:fedora35
oracle:mysql_workbenchthrough 8.0.27

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian11libssh0.9.5-1+deb11u1DSA-4965-1
Debian12, 13, 14libssh0.9.6-1DEBIAN-CVE-2021-3634
Ubuntu20.04:LTSlibssh0.9.3-2ubuntu2.2UBUNTU-CVE-2021-3634 USN-5053-1
Ubuntu22.04:LTSlibssh0.9.6-1UBUNTU-CVE-2021-3634
Red Hatenterprise_linux:8::appstreamlibssh-devel, libssh-debuginfo, libssh-debugsource0:0.9.6-3.el8RHSA-2022:2031
Red Hatenterprise_linux:8::baseoslibssh, libssh-config, libssh-debuginfo and 1 more0:0.9.6-3.el8RHSA-2022:2031
SUSEEnterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP2-LTSS, Linux Enterprise High Performance Computing 15 SP3-LTSS and 6 morelibssh0.9.8-150200.13.3.1SUSE-SU-2024:0525-1
SUSELinux Enterprise Server 12 SP5, Linux Enterprise Server for SAP Applications 12 SP5, Linux Enterprise Software Development Kit 12 SP5libssh0.9.8-3.12.2SUSE-SU-2024:0539-1
openSUSETumbleweedlibssh0.9.6-1.2openSUSE-SU-2024:10998-1
AlmaLinux8libssh, libssh-devel, libssh-config0.9.6-3.el8ALSA-2022:2031
Rocky Linux8libssh0:0.9.6-3.el8RLSA-2022:2031
Alpinev3.14, v3.15, v3.16 and 8 morelibssh0.9.6-r0ALPINE-CVE-2021-3634

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; the Alpine secdb, CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine.

Red Hat

Red Hat rates this Low.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 8libssh-0:0.9.6-3.el8Fixed 2022-05-10RHSA-2022:2031
Red Hat Enterprise Linux 7libsshOut of support scope
Red Hat Enterprise Linux 9libsshNot affected
Red Hat Virtualization 4libsshOut of support scope

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2021-3634.

References

Check your stackJSON