CVEfocus › CVE database › CVE-2021-3634

CVE-2021-3634

EPSS 4.7% (higher than 93% of CVEs)Published 2021-08-31Updated 2024-08-03Assigner: redhat

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.

CWE-787

What to do

Fixed builds are available from AlmaLinux, Alpine, Debian, Red Hat, Rocky Linux, Ubuntu: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

23Fixed
2Fix pending
1Will not fix
3Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 22.04libsshFixed0.9.6-1UBUNTU-CVE-2021-3634
Ubuntu 20.04libsshFixed0.9.3-2ubuntu2.2UBUNTU-CVE-2021-3634
Ubuntu 16.04libsshFix pending
Ubuntu 14.04libsshFix pending
Debian 14libsshFixed0.9.6-1DEBIAN-CVE-2021-3634
Debian 13libsshFixed0.9.6-1DEBIAN-CVE-2021-3634
Debian 12libsshFixed0.9.6-1DEBIAN-CVE-2021-3634
Red Hat Enterprise Linux 9libsshNot affected
Red Hat Enterprise Linux 9libssh-configNot affected
Red Hat Enterprise Linux 9libssh-develNot affected
Red Hat Enterprise Linux 8libsshFixed0:0.9.6-3.el8RHSA-2022:2031
Red Hat Enterprise Linux 8libssh-configFixed0:0.9.6-3.el8RHSA-2022:2031
Red Hat Enterprise Linux 8libssh-develFixed0:0.9.6-3.el8RHSA-2022:2031
Red Hat Enterprise Linux 7libsshWill not fix
Out of support scope
AlmaLinux 8libsshFixed0.9.6-3.el8ALSA-2022:2031
AlmaLinux 8libssh-configFixed0.9.6-3.el8ALSA-2022:2031
AlmaLinux 8libssh-develFixed0.9.6-3.el8ALSA-2022:2031
Rocky Linux 8libsshFixed0:0.9.6-3.el8RLSA-2022:2031
Alpine Linux 3.24libsshFixed0.9.6-r0ALPINE-CVE-2021-3634
Alpine Linux 3.23libsshFixed0.9.6-r0ALPINE-CVE-2021-3634
Alpine Linux 3.22libsshFixed0.9.6-r0ALPINE-CVE-2021-3634
Alpine Linux 3.21libsshFixed0.9.6-r0ALPINE-CVE-2021-3634
Alpine Linux 3.20libsshFixed0.9.6-r0ALPINE-CVE-2021-3634
Alpine Linux 3.19libsshFixed0.9.6-r0ALPINE-CVE-2021-3634
Alpine Linux 3.18libsshFixed0.9.6-r0ALPINE-CVE-2021-3634
Alpine Linux 3.17libsshFixed0.9.6-r0ALPINE-CVE-2021-3634
Alpine Linux 3.16libsshFixed0.9.6-r0ALPINE-CVE-2021-3634
Alpine Linux 3.15libsshFixed0.9.6-r0ALPINE-CVE-2021-3634
Alpine Linux 3.14libsshFixed0.9.6-r0ALPINE-CVE-2021-3634

What the vendor says

As published in the CVE record by redhat, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.