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

CVE-2025-5372
MEDIUM 5.0

At a glance

Source
NVD
EPSS
EPSS 0.50 % · percentile 43 ()
State
PUBLISHED
Published
Updated
Assigner
redhat
NVD status
Modified

Description

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.

Weaknesses (CWE)

  • CWE-682 — Incorrect Calculation

References

Scores

VersionScoreVectorScored by
CVSS 3.1MEDIUM 5.0CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:Lredhat
CVSS 3.1MEDIUM 5.0CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:LNVD · secalert@redhat.com (Secondary)
CVSS 3.1HIGH 8.8CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HNVD · nvd@nist.gov (Primary)

European references

CERT-FR advisories

Affected configurations (NVD CPE)

Affected products

ProductVersions
libssh · libsshaffected 0 < 0.11.2
Red Hat · Red Hat Enterprise Linux 8unaffected 0:0.9.6-16.el8_10 < *
Red Hat · Red Hat Enterprise Linux 8unaffected 0:0.9.6-16.el8_10 < *
Red Hat · Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Supportunaffected 0:0.9.4-2.el8_4.2 < *
Red Hat · Red Hat Enterprise Linux 8.4 Extended Update Support Long-Life Add-Onunaffected 0:0.9.4-2.el8_4.2 < *
Red Hat · Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Supportunaffected 0:0.9.6-4.el8_6.2 < *
Red Hat · Red Hat Enterprise Linux 8.6 Extended Update Support Long-Life Add-Onunaffected 0:0.9.6-4.el8_6.2 < *
Red Hat · Red Hat Enterprise Linux 8.8 Telecommunications Update Serviceunaffected 0:0.9.6-13.el8_8.2 < *
Red Hat · Red Hat Enterprise Linux 8.8 Update Services for SAP Solutionsunaffected 0:0.9.6-13.el8_8.2 < *
Red Hat · Red Hat Enterprise Linux 9.0 Update Services for SAP Solutionsunaffected 0:0.9.6-3.el9_0.2 < *
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
Red Hat · Red Hat OpenShift Container Platform 4

Sources

SourceLicence
CVE List (CVEProject cvelistV5)CVE Program Terms of Use
EPSS (FIRST.org)FIRST — attribution requested
ENISA EUVDENISA — reproduction authorised, source acknowledged
CERT-FR (ANSSI)Licence Ouverte / Etalab 2.0
NVD (NIST) via fkie-cad/nvd-json-data-feedsPublic domain — this product uses data from the NVD API but is not endorsed or certified by the NVD