PoC Monitor
← All CVEs
CVE-2025-5987published 7 Jul 2025 14:24 UTCData: JSON · API

Red Hat

Libssh: invalid return code for chacha20 poly1305 with openssl backend

A flaw was found in libssh when using the ChaCha20 cipher with the OpenSSL library. If an attacker manages to exhaust the heap space, this error is not detected and may lead to libssh using a partially initialized cipher context. This occurs because the OpenSSL error code returned aliases with the SSH_OK code, resulting in libssh not properly detecting the error returned by the OpenSSL library. This issue can lead to undefined behavior, including compromised data confidentiality and integrity or crashes.

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

Affected versions and mitigation

From the CVE record and the vendor's references.

Affected

  • >= 0.10.0, < 0.11.2

Fixed in 0.11.2

Red Hat Red Hat Enterprise Linux 10

    Fixed in 0:0.11.1-5.el10_1

    Red Hat Red Hat Enterprise Linux 10.0 Extended Update Support

      Fixed in 0:0.11.1-4.el10_0.1

      Red Hat Red Hat Enterprise Linux 9

        Fixed in 0:0.10.4-17.el9_7

        Red Hat Red Hat Enterprise Linux 9

          Fixed in 0:0.10.4-17.el9_7

          Red Hat Red Hat Enterprise Linux 9.2 Update Services for SAP Solutions

            Fixed in 0:0.10.4-9.el9_2.2

            Red Hat Red Hat Enterprise Linux 9.4 Extended Update Support

              Fixed in 0:0.10.4-13.el9_4.2

              Red Hat Red Hat Enterprise Linux 9.6 Extended Update Support

                Fixed in 0:0.10.4-15.el9_6.1

                Red Hat Red Hat OpenShift Container Platform 4.13

                  Fixed in 413.92.202602240113-0

                  Red Hat Red Hat OpenShift Container Platform 4.14

                    Fixed in 414.92.202601191325-0

                    Red Hat Red Hat OpenShift Container Platform 4.15

                      Fixed in 415.92.202601271320-0

                      Red Hat Red Hat OpenShift Container Platform 4.16

                        Fixed in 416.94.202601160124-0

                        Red Hat Red Hat OpenShift Container Platform 4.17

                          Fixed in 417.94.202601120213-0

                          Red Hat Red Hat OpenShift Container Platform 4.18

                            Fixed in 418.94.202601202224-0

                            Red Hat Red Hat OpenShift Container Platform 4.19

                              Fixed in 4.19.9.6.202601260820-0

                              Red Hat Red Hat OpenShift Container Platform 4.20

                                Fixed in 4.20.9.6.202601211057-0

                                Mitigation

                                Upgrade the affected product to 0.11.2 or later.

                                Upgrade Red Hat Enterprise Linux 10 to 0:0.11.1-5.el10_1 or later.

                                Upgrade Red Hat Enterprise Linux 10.0 Extended Update Support to 0:0.11.1-4.el10_0.1 or later.

                                Upgrade Red Hat Enterprise Linux 9 to 0:0.10.4-17.el9_7 or later.

                                Upgrade Red Hat Enterprise Linux 9 to 0:0.10.4-17.el9_7 or later.

                                Upgrade Red Hat Enterprise Linux 9.2 Update Services for SAP Solutions to 0:0.10.4-9.el9_2.2 or later.

                                Upgrade Red Hat Enterprise Linux 9.4 Extended Update Support to 0:0.10.4-13.el9_4.2 or later.

                                Upgrade Red Hat Enterprise Linux 9.6 Extended Update Support to 0:0.10.4-15.el9_6.1 or later.

                                Upgrade Red Hat OpenShift Container Platform 4.13 to 413.92.202602240113-0 or later.

                                Upgrade Red Hat OpenShift Container Platform 4.14 to 414.92.202601191325-0 or later.

                                Upgrade Red Hat OpenShift Container Platform 4.15 to 415.92.202601271320-0 or later.

                                Upgrade Red Hat OpenShift Container Platform 4.16 to 416.94.202601160124-0 or later.

                                Upgrade Red Hat OpenShift Container Platform 4.17 to 417.94.202601120213-0 or later.

                                Upgrade Red Hat OpenShift Container Platform 4.18 to 418.94.202601202224-0 or later.

                                Upgrade Red Hat OpenShift Container Platform 4.19 to 4.19.9.6.202601260820-0 or later.

                                Upgrade Red Hat OpenShift Container Platform 4.20 to 4.20.9.6.202601211057-0 or later.

                                Workaround

                                A workaround for this issue is to disable the chacha20-poly1305@openssh.com cipher in applications using libssh when libssh is compiled with the OpenSSL backend, so the vulnerable ChaCha20-Poly1305 initialization path is not used. Alternatively, upgrade to a version of libssh containing the fix; upstream has released libssh 0.11.2 to correct this defect, and administrators are advised to upgrade or apply the upstream patch as soon as possible.

                                References

                                5 more

                                Timeline

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

                                No public PoC found yet; not in CISA KEV.

                                PoC repositories

                                Found on GitHub.

                                No PoC repositories found yet.