cve.bz

CVE-2025-5372 Libssh: incorrect return code handling in ssh_kdf() in libssh

8.8 highEPSS 1.0%Fix available

High (8.8). EPSS 1.0% estimated probability of exploitation activity in the next 30 days.

On this page
A flaw was found in libssh versions built with OpenSSL versions older than 3.0, specifically in the ssh_kdf() function responsible for key derivation. Due to inconsistent interpretation of return values where OpenSSL uses 0 to indicate failure and libssh uses 0 for success—the function may mistakenly return a success status even when key derivation fails. This results in uninitialized cryptographic key buffers being used in subsequent communication, potentially compromising SSH sessions' confidentiality, integrity, and availability.

Severity

CVSS 3.1

8.8 high
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS
1.0% (up from 0.5% a week ago; 0.5% 30 days ago) estimated probability of exploitation activity in the next 30 days; 63rd percentile. Scored 2026-11-30. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: partial, assessed 2025-07-08. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-682 Incorrect Calculation
Published
Modified
Assigned by
redhat (CNA)
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

  • Red Hat Red Hat Enterprise Linux 8: fixed in 0:0.9.6-16.el8_10
  • Red Hat Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support: fixed in 0:0.9.4-2.el8_4.2
  • Red Hat Red Hat Enterprise Linux 8.4 Extended Update Support Long-Life Add-On: fixed in 0:0.9.4-2.el8_4.2
  • Red Hat Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Support: fixed in 0:0.9.6-4.el8_6.2
  • Red Hat Red Hat Enterprise Linux 8.6 Extended Update Support Long-Life Add-On: fixed in 0:0.9.6-4.el8_6.2
  • Red Hat Red Hat Enterprise Linux 8.8 Telecommunications Update Service: fixed in 0:0.9.6-13.el8_8.2
  • Red Hat Red Hat Enterprise Linux 8.8 Update Services for SAP Solutions: fixed in 0:0.9.6-13.el8_8.2
  • Red Hat Red Hat Enterprise Linux 9.0 Update Services for SAP Solutions: fixed in 0:0.9.6-3.el9_0.2
  • Debian, Ubuntu, Red Hat, SUSE, openSUSE, AlmaLinux, Rocky Linux, Alpine, Azure Linux, Alpaquita: fixed package versions per release

Ask an AI about this CVE

Show the promptExplain CVE-2025-5372 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2025-5372?via=ask-ai-copy and https://cve.bz/cve/CVE-2025-5372?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-2025-5372 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 CNA's record in the CVE List.

ProductAffected
libsshbefore 0.11.2

Fixed in

ProductFixed in
Red Hat Enterprise Linux 80:0.9.6-16.el8_10
Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support0:0.9.4-2.el8_4.2
Red Hat Enterprise Linux 8.4 Extended Update Support Long-Life Add-On0:0.9.4-2.el8_4.2
Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Support0:0.9.6-4.el8_6.2
Red Hat Enterprise Linux 8.6 Extended Update Support Long-Life Add-On0:0.9.6-4.el8_6.2
Red Hat Enterprise Linux 8.8 Telecommunications Update Service0:0.9.6-13.el8_8.2
Red Hat Enterprise Linux 8.8 Update Services for SAP Solutions0:0.9.6-13.el8_8.2
Red Hat Enterprise Linux 9.0 Update Services for SAP Solutions0:0.9.6-3.el9_0.2

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian11libssh0.9.8-0+deb11u2DLA-4385-1
Debian12libssh0.10.6-0+deb12u2DEBIAN-CVE-2025-5372
Debian13, 14libssh0.11.2-1DEBIAN-CVE-2025-5372
Ubuntu22.04:LTSlibssh0.9.6-2ubuntu0.22.04.4UBUNTU-CVE-2025-5372 USN-7619-1
Ubuntu24.04:LTSlibssh0.10.6-2ubuntu0.1UBUNTU-CVE-2025-5372 USN-7619-1
UbuntuPro:16.04:LTS, Pro:18.04:LTS, Pro:20.04:LTSlibsshno fix listedUBUNTU-CVE-2025-5372
Red Hatenterprise_linux:8::appstreamlibssh-devel, libssh-debuginfo, libssh-debugsource0:0.9.6-16.el8_10RHSA-2025:21977
Red Hatenterprise_linux:8::baseoslibssh, libssh-config, libssh-debuginfo and 1 more0:0.9.6-16.el8_10RHSA-2025:21977
Red Hatrhel_aus:8.4::appstream, rhel_eus_long_life:8.4::appstreamlibssh-devel, libssh-debuginfo, libssh-debugsource0:0.9.4-2.el8_4.2RHSA-2026:24349
Red Hatrhel_aus:8.4::baseos, rhel_eus_long_life:8.4::baseoslibssh, libssh-config, libssh-debuginfo and 1 more0:0.9.4-2.el8_4.2RHSA-2026:24349
Red Hatrhel_aus:8.6::appstream, rhel_eus_long_life:8.6::appstreamlibssh-devel, libssh-debuginfo, libssh-debugsource0:0.9.6-4.el8_6.2RHSA-2026:25911
Red Hatrhel_aus:8.6::baseos, rhel_eus_long_life:8.6::baseoslibssh, libssh-config, libssh-debuginfo and 1 more0:0.9.6-4.el8_6.2RHSA-2026:25911
Red Hatrhel_e4s:8.8::appstream, rhel_tus:8.8::appstreamlibssh-devel, libssh-debuginfo, libssh-debugsource0:0.9.6-13.el8_8.2RHSA-2026:20610
Red Hatrhel_e4s:8.8::baseos, rhel_tus:8.8::baseoslibssh, libssh-config, libssh-debuginfo and 1 more0:0.9.6-13.el8_8.2RHSA-2026:20610
Red Hatrhel_e4s:9.0::appstreamlibssh-devel, libssh-debuginfo, libssh-debugsource0:0.9.6-3.el9_0.2RHSA-2025:23024
Red Hatrhel_e4s:9.0::baseoslibssh, libssh-config, libssh-debuginfo and 1 more0:0.9.6-3.el9_0.2RHSA-2025:23024
SUSEEnterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP3-LTSS, Linux Enterprise Micro 5.1 and 3 morelibssh0.9.8-150200.13.9.1SUSE-SU-2025:02279-1
SUSELinux Enterprise High Performance Computing 15 SP4-ESPOS, Linux Enterprise High Performance Computing 15 SP4-LTSS, Linux Enterprise High Performance Computing 15 SP5-ESPOS and 10 morelibssh0.9.8-150400.3.9.1SUSE-SU-2025:02278-1
SUSELinux Enterprise Module for Basesystem 15 SP6, Linux Enterprise Module for Basesystem 15 SP7libssh0.9.8-150600.11.3.1SUSE-SU-2025:02229-1
SUSELinux Enterprise Server 12 SP5-LTSS, Linux Enterprise Server LTSS Extended Security 12 SP5libssh0.9.8-3.15.1SUSE-SU-2025:02281-1
SUSELinux Micro 6.0libssh0.10.6-2.1SUSE-SU-2025:20557-1
SUSELinux Micro 6.1libssh0.10.6-slfo.1.1_2.1SUSE-SU-2025:20596-1
openSUSELeap 15.6libssh0.9.8-150600.11.3.1SUSE-SU-2025:02229-1
openSUSETumbleweedlibssh0.11.2-1.1openSUSE-SU-2025:15243-1
AlmaLinux8libssh, libssh-devel, libssh-config0.9.6-16.el8_10ALSA-2025:21977
Rocky Linux8libssh0:0.9.6-16.el8_10RLSA-2025:21977
Alpinev3.22, v3.23, v3.24libssh0.11.2-r0ALPINE-CVE-2025-5372
Azure Linux2libssh0.10.6-2AZL-64650
Azure Linux3libssh0.10.6-2AZL-64656
Alpaquita23, 25, streamlibssh0.11.2-r0BELL-CVE-2025-5372

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; Microsoft's Azure Linux vulnerability data, MIT; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine · Alpaquita.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

The Red Hat Product Security team has assessed the severity of this vulnerability as Moderate due to the combination of limited prerequisites and its impact on confidentiality, integrity, and availability. The vulnerability is only present when libssh is built with OpenSSL versions older than 3.0. Successful exploitation could allow an attacker to initiate cryptographic operations using uninitialized keys, which may compromise secure SSH sessions.

Red Hat's mitigation

To mitigate this issue, administrators should ensure that libssh is built against OpenSSL version 3.0 or later. This change eliminates the return code mismatch and prevents the erroneous use of uninitialized key material. It is also strongly recommended to apply vendor supplied patches or update to the latest libssh security release as soon as possible.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 8libssh-0:0.9.6-16.el8_10Fixed 2025-11-24RHSA-2025:21977
Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Supportlibssh-0:0.9.4-2.el8_4.2Fixed 2026-06-08RHSA-2026:24349
Red Hat Enterprise Linux 8.4 Extended Update Support Long-Life Add-Onlibssh-0:0.9.4-2.el8_4.2Fixed 2026-06-08RHSA-2026:24349
Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Supportlibssh-0:0.9.6-4.el8_6.2Fixed 2026-06-15RHSA-2026:25911
Red Hat Enterprise Linux 8.6 Extended Update Support Long-Life Add-Onlibssh-0:0.9.6-4.el8_6.2Fixed 2026-06-15RHSA-2026:25911
Red Hat Enterprise Linux 8.8 Telecommunications Update Servicelibssh-0:0.9.6-13.el8_8.2Fixed 2026-05-26RHSA-2026:20610
Red Hat Enterprise Linux 8.8 Update Services for SAP Solutionslibssh-0:0.9.6-13.el8_8.2Fixed 2026-05-26RHSA-2026:20610
Red Hat Enterprise Linux 9.0 Update Services for SAP Solutionslibssh-0:0.9.6-3.el9_0.2Fixed 2025-12-10RHSA-2025:23024
Red Hat Enterprise Linux 10libsshNot affected
Red Hat Enterprise Linux 6libssh2Out of support scope
Red Hat Enterprise Linux 7libssh2Out of support scope
Red Hat Enterprise Linux 9libsshAffected
Red Hat OpenShift Container Platform 4openshift/ose-rhel-coreos-8Affected
Red Hat OpenShift Container Platform 4openshift/ose-rhel-coreos-9Not affected

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-2025-5372.

Attack patterns (CAPEC)

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON