Skip to content
Fencer Vulns
medium 5.0

CVE-2025-5372 json

Libssh: incorrect return code handling in ssh_kdf() in libssh

published 2025-07-04 16 mo ago modified 2026-11-05 3 d ago also EUVD-2025-19931 , JLSEC-2025-97

cvss
5.0
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.5%
EPSS 0.5% chance of exploitation in 30 days, percentile 44%
public exploits
0
none known

Summary

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.

Patch / fix

  • julia libssh_jll 0.11.3+0
  • libssh libssh 0.11.2
  • Red Hat Red Hat Enterprise Linux 8 0:0.9.6-16.el8_10
  • Red Hat Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support 0:0.9.4-2.el8_4.2
  • Red Hat Red Hat Enterprise Linux 8.4 Extended Update Support Long-Life Add-On 0:0.9.4-2.el8_4.2
  • Red Hat Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Support 0:0.9.6-4.el8_6.2
  • Red Hat Red Hat Enterprise Linux 8.6 Extended Update Support Long-Life Add-On 0:0.9.6-4.el8_6.2
  • Red Hat Red Hat Enterprise Linux 8.8 Telecommunications Update Service 0:0.9.6-13.el8_8.2
  • Red Hat Red Hat Enterprise Linux 8.8 Update Services for SAP Solutions 0:0.9.6-13.el8_8.2
  • Red Hat Red Hat Enterprise Linux 9.0 Update Services for SAP Solutions 0:0.9.6-3.el9_0.2
  • libssh Debian 12 0.10.6-0+deb12u2
  • libssh Debian 14, Debian 13 0.11.2-1

debian advisories DEBIAN-CVE-2025-5372

  • libssh Ubuntu 22.04 LTS 0.9.6-2ubuntu0.22.04.4
  • libssh Ubuntu 24.04 LTS 0.10.6-2ubuntu0.1

ubuntu advisories UBUNTU-CVE-2025-5372

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-16.el8_10
  • libssh-config RHEL 8 0.9.6-16.el8_10
  • libssh RHEL 8.6 EUS_LONG_LIFE, RHEL 8.6 AUS 0.9.6-4.el8_6.2
  • libssh-config RHEL 8.6 EUS_LONG_LIFE, RHEL 8.6 AUS 0.9.6-4.el8_6.2
  • libssh RHEL 8.4 EUS_LONG_LIFE, RHEL 8.4 AUS 0.9.4-2.el8_4.2
  • libssh-config RHEL 8.4 EUS_LONG_LIFE, RHEL 8.4 AUS 0.9.4-2.el8_4.2
  • libssh RHEL 8.8 TUS, RHEL 8.8 E4S 0.9.6-13.el8_8.2
  • libssh-config RHEL 8.8 TUS, RHEL 8.8 E4S 0.9.6-13.el8_8.2

red hat advisories RHSA-2026:25911RHSA-2026:24349RHSA-2026:20610RHSA-2025:23024RHSA-2025:21977

  • libssh Linux Micro 6.1 0.10.6-slfo.1.1_2.1
  • libssh Linux Micro 6.0 0.10.6-2.1
  • libssh SLES for SAP 15 SP3, SLES 15 SP3-LTSS, SLE Micro 5.2 +3 more 0.9.8-150200.13.9.1
  • libssh SLES for SAP 15 SP5, SLES for SAP 15 SP4, SLES 15 SP5-LTSS +10 more 0.9.8-150400.3.9.1
  • libssh SLE Module for Basesystem 15 SP7, SLE Module for Basesystem 15 SP6, openSUSE Leap 15.6 0.9.8-150600.11.3.1
  • libssh SLES LTSS Extended Security 12 SP5, SLES 12 SP5-LTSS 0.9.8-3.15.1

suse advisories SUSE-SU-2025:20596-1SUSE-SU-2025:20557-1SUSE-SU-2025:02281-1SUSE-SU-2025:02279-1SUSE-SU-2025:02278-1SUSE-SU-2025:02229-1

  • libssh openSUSE Tumbleweed 0.11.2-1.1

opensuse advisories openSUSE-SU-2025:15243-1

  • libssh AlmaLinux 8 0.9.6-16.el8_10
  • libssh-config AlmaLinux 8 0.9.6-16.el8_10

almalinux advisories ALSA-2025:21977

  • libssh Rocky Linux 8 0.9.6-16.el8_10

rocky linux advisories RLSA-2025:21977

  • libssh Alpine 3.24, Alpine 3.23, Alpine 3.22 0.11.2-r0

alpine advisories ALPINE-CVE-2025-5372

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 CBL-Mariner 2.0, Azure Linux 3.0 0.10.6-2

azure linux advisories AZL-64650AZL-64656

Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT

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-2025-5372 updated cvss 5.0

libssh: Incorrect Return Code Handling in ssh_kdf() in libssh

  • Red Hat Enterprise Linux 6 libssh2 Red Hat Enterprise Linux 7 libssh2
    affected: workaround, no fix planned “Out of support scope”
  • Red Hat Enterprise Linux 9 libssh, libssh-config Red Hat OpenShift Container Platform 4 openshift/ose-rhel-coreos-8
    affected: workaround, no fix available
  • Red Hat Enterprise Linux AppStream (v. 8) libssh-devel 0.9.6-16.el8_10, libssh-debuginfo 0.9.6-16.el8_10, libssh-debugsource 0.9.6-16.el8_10
    fixed: vendor fix RHSA-2025:21977
  • Red Hat Enterprise Linux AppStream AUS (v.8.4) libssh-devel 0.9.4-2.el8_4.2, libssh-debuginfo 0.9.4-2.el8_4.2, libssh-debugsource 0.9.4-2.el8_4.2
    fixed: vendor fix RHSA-2026:24349
  • Red Hat Enterprise Linux AppStream AUS (v.8.6) libssh-devel 0.9.6-4.el8_6.2, libssh-debuginfo 0.9.6-4.el8_6.2, libssh-debugsource 0.9.6-4.el8_6.2
    fixed: vendor fix RHSA-2026:25911
  • Red Hat Enterprise Linux AppStream E4S (v.8.8) libssh-devel 0.9.6-13.el8_8.2, libssh-debuginfo 0.9.6-13.el8_8.2, libssh-debugsource 0.9.6-13.el8_8.2
    fixed: vendor fix RHSA-2026:20610
  • Red Hat Enterprise Linux AppStream E4S (v.9.0) libssh-devel 0.9.6-3.el9_0.2, libssh-debuginfo 0.9.6-3.el9_0.2, libssh-debugsource 0.9.6-3.el9_0.2
    fixed: vendor fix RHSA-2025:23024
  • Red Hat Enterprise Linux AppStream EUS EXTENSION (v.8.4) libssh-devel 0.9.4-2.el8_4.2, libssh-debuginfo 0.9.4-2.el8_4.2, libssh-debugsource 0.9.4-2.el8_4.2
    fixed: vendor fix RHSA-2026:24349
show 11 more
  • Red Hat Enterprise Linux AppStream EUS EXTENSION (v.8.6) libssh-devel 0.9.6-4.el8_6.2, libssh-debuginfo 0.9.6-4.el8_6.2, libssh-debugsource 0.9.6-4.el8_6.2
    fixed: vendor fix RHSA-2026:25911
  • Red Hat Enterprise Linux AppStream TUS (v.8.8) libssh-devel 0.9.6-13.el8_8.2, libssh-debuginfo 0.9.6-13.el8_8.2, libssh-debugsource 0.9.6-13.el8_8.2
    fixed: vendor fix RHSA-2026:20610
  • Red Hat Enterprise Linux BaseOS (v. 8) libssh 0.9.6-16.el8_10, libssh-config 0.9.6-16.el8_10
    fixed: vendor fix RHSA-2025:21977
  • Red Hat Enterprise Linux BaseOS AUS (v.8.4) libssh 0.9.4-2.el8_4.2, libssh-config 0.9.4-2.el8_4.2
    fixed: vendor fix RHSA-2026:24349
  • Red Hat Enterprise Linux BaseOS AUS (v.8.6) libssh 0.9.6-4.el8_6.2, libssh-config 0.9.6-4.el8_6.2
    fixed: vendor fix RHSA-2026:25911
  • Red Hat Enterprise Linux BaseOS E4S (v.8.8) libssh 0.9.6-13.el8_8.2, libssh-config 0.9.6-13.el8_8.2
    fixed: vendor fix RHSA-2026:20610
  • Red Hat Enterprise Linux BaseOS E4S (v.9.0) libssh 0.9.6-3.el9_0.2, libssh-config 0.9.6-3.el9_0.2
    fixed: vendor fix RHSA-2025:23024
  • Red Hat Enterprise Linux BaseOS EUS EXTENSION (v.8.4) libssh 0.9.4-2.el8_4.2, libssh-config 0.9.4-2.el8_4.2
    fixed: vendor fix RHSA-2026:24349
  • Red Hat Enterprise Linux BaseOS EUS EXTENSION (v.8.6) libssh 0.9.6-4.el8_6.2, libssh-config 0.9.6-4.el8_6.2
    fixed: vendor fix RHSA-2026:25911
  • Red Hat Enterprise Linux BaseOS TUS (v.8.8) libssh 0.9.6-13.el8_8.2, libssh-config 0.9.6-13.el8_8.2
    fixed: vendor fix RHSA-2026:20610
  • Red Hat Enterprise Linux 10 libssh Red Hat OpenShift Container Platform 4 openshift/ose-rhel-coreos-9
    not 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

CISA SSVC

Exploitation
none
Automatable
no
Technical impact
partial
Assessed
16 mo ago

Exploit prediction

0.51% chance of exploitation in the next 30 days, higher than 44% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CNA 3.1 5.0 CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L
NVD 3.1 8.8 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
OSV 3.1 8.8 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Affected packages

ecosystem package affected fixed in
julia libssh_jll
<0.11.3+0
0.11.3+0

Affected products

  • libssh libssh
  • Red Hat Red Hat Enterprise Linux 8
  • Red Hat Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support
  • Red Hat Red Hat Enterprise Linux 8.4 Extended Update Support Long-Life Add-On
  • Red Hat Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Support
  • Red Hat Red Hat Enterprise Linux 8.6 Extended Update Support Long-Life Add-On
  • Red Hat Red Hat Enterprise Linux 8.8 Telecommunications Update Service
  • Red Hat Red Hat Enterprise Linux 8.8 Update Services for SAP Solutions
  • Red Hat Red Hat Enterprise Linux 9.0 Update Services for SAP Solutions
  • Red Hat Red Hat Enterprise Linux 10
  • Red Hat Red Hat Enterprise Linux 6
  • Red Hat Red Hat Enterprise Linux 7
  • Red Hat Red Hat Enterprise Linux 9
  • Red Hat Red Hat OpenShift Container Platform 4

Classification

Weakness

References

Sources

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.

CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.