PoC Monitor
← All CVEs
CVE-2025-5372published 4 Jul 2025 06:01 UTCData: JSON · API

Libssh

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

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.

First public PoC None yetno public PoC found
Public PoCs00 on GitHub
CVSS8.8high · scored by NVD · CWE-682
CISA KEV Not listednot known exploited

Affected versions and mitigation

From the CVE record and the vendor's references.

Affected

libssh libssh
  • < 0.11.2

Fixed in 0.11.2

Red Hat Red Hat Enterprise Linux 8

    Fixed in 0:0.9.6-16.el8_10

    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

                    Mitigation

                    Upgrade libssh to 0.11.2 or later.

                    Upgrade Red Hat Enterprise Linux 8 to 0:0.9.6-16.el8_10 or later.

                    Upgrade Red Hat Enterprise Linux 8 to 0:0.9.6-16.el8_10 or later.

                    Upgrade Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support to 0:0.9.4-2.el8_4.2 or later.

                    Upgrade Red Hat Enterprise Linux 8.4 Extended Update Support Long-Life Add-On to 0:0.9.4-2.el8_4.2 or later.

                    Upgrade Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Support to 0:0.9.6-4.el8_6.2 or later.

                    Upgrade Red Hat Enterprise Linux 8.6 Extended Update Support Long-Life Add-On to 0:0.9.6-4.el8_6.2 or later.

                    Upgrade Red Hat Enterprise Linux 8.8 Telecommunications Update Service to 0:0.9.6-13.el8_8.2 or later.

                    Upgrade Red Hat Enterprise Linux 8.8 Update Services for SAP Solutions to 0:0.9.6-13.el8_8.2 or later.

                    Upgrade Red Hat Enterprise Linux 9.0 Update Services for SAP Solutions to 0:0.9.6-3.el9_0.2 or later.

                    Workaround

                    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.

                    References

                    2 more

                    Timeline

                    Days relative to CVE publication
                    -2t=0+2+4+6+8CVE published4 Jul 2025 · t = 0

                    No public PoC found yet; not in CISA KEV.

                    PoC repositories

                    Found on GitHub.

                    No PoC repositories found yet.