# CVE-2021-3634: A flaw has been found in libssh in versions prior to 0.9.6.

- Severity: Medium 6.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 4.68%, higher than 93% of CVEs (2026-11-30)
- Published: 2021-08-31T00:00:00.000Z
- Modified: 2026-06-17T04:05:28.780Z
- Weaknesses: CWE-787
- Assigned by: redhat

## 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.

(As written by CVE List.)

## Affected

- libssh: libssh 0.9.6
- libssh libssh: from 0.9.1 before 0.9.6
- redhat virtualization: 4.0
- redhat enterprise_linux: 8.0
- debian debian_linux: 10.0; 11.0
- fedoraproject fedora: 33; 34; 35
- oracle mysql_workbench: up to 8.0.27
- netapp cloud_backup: no versions given

## Every score

- NVD: 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`
- NVD: CVSS:2.0 4.0 Medium `AV:N/AC:L/Au:S/C:N/I:N/A:P`

## References

- <https://bugzilla.redhat.com/show_bug.cgi?id=1978810> (issue-tracking, third-party-advisory)
- <https://www.debian.org/security/2021/dsa-4965> (third-party-advisory, vendor-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/SVWAAB2XMKEUMPMDALINKAA4U2QM4LNG/> (vendor-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/JKYD3ZRAMDAQX3ZW6THHUF3GXN7FF6B4/> (vendor-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/DRK67AJCWYYVAGF5SGAHNZXCX3PN3ZFP/> (vendor-advisory)
- <https://www.oracle.com/security-alerts/cpujan2022.html> (patch, third-party-advisory)
- <https://security.netapp.com/advisory/ntap-20211004-0003/> (third-party-advisory)
- <https://security.gentoo.org/glsa/202312-05> (vendor-advisory)

## Sources

- CVE List: [CVE-2021-3634](https://www.cve.org/CVERecord?id=CVE-2021-3634), CVE Terms of Use, modified 2024-08-03
- NVD: [CVE-2021-3634](https://nvd.nist.gov/vuln/detail/CVE-2021-3634), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-3634 · Whole record: https://cve.day/CVE-2021-3634.json · Rebuilt by cve.day 2026-11-25T22:58:03.584Z
