CVE-2025-5372

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

State
Published
Severity
5.0 Medium
Published
Jul 4, 2025
Updated
Sep 1, 2026
Reserved
May 30, 2025

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
3.15.0 MediumCVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:Lredhat

Weaknesses

Affected Products

ProductVersions
libsshlibssh
  • before 0.11.2Affected
Red Hat Enterprise Linux 8Red Hat
  • 0:0.9.6-16.el8_10 and laterNot affected
Red Hat Enterprise Linux 8Red Hat
  • 0:0.9.6-16.el8_10 and laterNot affected
Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update SupportRed Hat
  • 0:0.9.4-2.el8_4.2 and laterNot affected
Red Hat Enterprise Linux 8.4 Extended Update Support Long-Life Add-OnRed Hat
  • 0:0.9.4-2.el8_4.2 and laterNot affected
Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update SupportRed Hat
  • 0:0.9.6-4.el8_6.2 and laterNot affected
Red Hat Enterprise Linux 8.6 Extended Update Support Long-Life Add-OnRed Hat
  • 0:0.9.6-4.el8_6.2 and laterNot affected
Red Hat Enterprise Linux 8.8 Telecommunications Update ServiceRed Hat
  • 0:0.9.6-13.el8_8.2 and laterNot affected
Red Hat Enterprise Linux 8.8 Update Services for SAP SolutionsRed Hat
  • 0:0.9.6-13.el8_8.2 and laterNot affected
Red Hat Enterprise Linux 9.0 Update Services for SAP SolutionsRed Hat
  • 0:0.9.6-3.el9_0.2 and laterNot affected
Red Hat Enterprise Linux 10Red Hat
    Red Hat Enterprise Linux 6Red Hat
      Red Hat Enterprise Linux 7Red Hat
        Red Hat Enterprise Linux 9Red Hat
          Red Hat OpenShift Container Platform 4Red Hat
            Red Hat OpenShift Container Platform 4Red Hat

              References

              Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.