{"id":"CVE-2025-5987","aliases":["CVE-2025-5987"],"related":[],"kind":"vulnerability","state":"published","title":"Libssh: invalid return code for chacha20 poly1305 with openssl backend","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"es","text":"Se detectó una falla en libssh al usar el cifrado ChaCha20 con la librería OpenSSL. Si un atacante logra agotar el espacio del montón, este error no se detecta y puede provocar que libssh use un contexto de cifrado parcialmente inicializado. Esto se debe a que el código de error de OpenSSL devolvió alias con el código SSH_OK, lo que impide que libssh detecte correctamente el error devuelto por la librería OpenSSL. Este problema puede provocar un comportamiento indefinido, como la confidencialidad e integridad de los datos comprometidas o fallos.","source":"nvd"}],"published":"2025-07-07T14:24:12.576Z","modified":"2026-11-23T23:17:00.763Z","severity":{"scorer":"redhat","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","score":8.1,"rating":"HIGH"},"severities":[{"scorer":"redhat","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","score":8.1,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","score":8.1,"rating":"HIGH"}],"cwes":["CWE-393"],"affected":[{"ranges":[{"type":"semver","introduced":"0.10.0","fixed":"0.11.2","status":"affected"}],"package":"libssh","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"0:0.11.1-5.el10_1","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 10","package":"libssh","cpe":"cpe:/o:redhat:enterprise_linux:10.1","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"0:0.11.1-4.el10_0.1","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 10.0 Extended Update Support","package":"libssh","cpe":"cpe:/o:redhat:enterprise_linux_eus:10.0","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"0:0.10.4-17.el9_7","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 9","package":"libssh","cpe":"cpe:/a:redhat:enterprise_linux:9::appstream","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"0:0.10.4-17.el9_7","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 9","package":"libssh","cpe":"cpe:/a:redhat:enterprise_linux:9::appstream","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"0:0.10.4-9.el9_2.2","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 9.2 Update Services for SAP Solutions","package":"libssh","cpe":"cpe:/a:redhat:rhel_e4s:9.2::appstream","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"0:0.10.4-13.el9_4.2","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 9.4 Extended Update Support","package":"libssh","cpe":"cpe:/a:redhat:rhel_eus:9.4::appstream","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"0:0.10.4-15.el9_6.1","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 9.6 Extended Update Support","package":"libssh","cpe":"cpe:/a:redhat:rhel_eus:9.6::appstream","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"413.92.202602240113-0","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat OpenShift Container Platform 4.13","package":"openshift/ose-rhel-coreos-9","cpe":"cpe:/a:redhat:openshift:4.13::el9","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"414.92.202601191325-0","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat OpenShift Container Platform 4.14","package":"openshift/ose-rhel-coreos-9","cpe":"cpe:/a:redhat:openshift:4.14::el9","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"415.92.202601271320-0","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat OpenShift Container Platform 4.15","package":"openshift/ose-rhel-coreos-9","cpe":"cpe:/a:redhat:openshift:4.15::el9","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"416.94.202601160124-0","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat OpenShift Container Platform 4.16","package":"openshift/ose-rhel-coreos-9","cpe":"cpe:/a:redhat:openshift:4.16::el9","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"417.94.202601120213-0","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat OpenShift Container Platform 4.17","package":"openshift/ose-rhel-coreos-9","cpe":"cpe:/a:redhat:openshift:4.17::el9","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"418.94.202601202224-0","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat OpenShift Container Platform 4.18","package":"openshift/ose-rhel-coreos-9","cpe":"cpe:/a:redhat:openshift:4.18::el9","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"4.19.9.6.202601260820-0","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat OpenShift Container Platform 4.19","package":"openshift/ose-rhel-coreos-9","cpe":"cpe:/a:redhat:openshift:4.19::el9","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"4.20.9.6.202601211057-0","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat OpenShift Container Platform 4.20","package":"openshift/ose-rhel-coreos-9","cpe":"cpe:/a:redhat:openshift:4.20::el9","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 6","package":"libssh2","cpe":"cpe:/o:redhat:rhel_els:6","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 7","package":"libssh2","cpe":"cpe:/o:redhat:rhel_els:7","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 8","package":"libssh","cpe":"cpe:/o:redhat:enterprise_linux:8","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat OpenShift Container Platform 4","package":"openshift/ose-rhel-coreos-8","cpe":"cpe:/a:redhat:openshift:4","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"0.10.0","fixed":"0.11.2"}],"vendor":"libssh","product":"libssh","cpe":"cpe:2.3:a:libssh:libssh:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://access.redhat.com/errata/RHSA-2025:23483","tags":["vendor-advisory","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2025:23484","tags":["vendor-advisory","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2026:0427","tags":["vendor-advisory","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2026:0428","tags":["vendor-advisory","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2026:0430","tags":["vendor-advisory","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2026:0431","tags":["vendor-advisory","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2026:0702","tags":["vendor-advisory","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2026:0978","tags":["vendor-advisory","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2026:0980","tags":["vendor-advisory","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2026:0985","tags":["vendor-advisory","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2026:0996","tags":["vendor-advisory","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2026:1539","tags":["vendor-advisory","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2026:1541","tags":["vendor-advisory","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2026:3415","tags":["vendor-advisory","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://access.redhat.com/security/cve/CVE-2025-5987","tags":["third-party-advisory","vdb-entry","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2376219","tags":["issue-tracking","third-party-advisory","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://www.libssh.org/security/advisories/CVE-2025-5987.txt","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"redhat","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-01-22T04:55:55.619Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-5987","url":"https://www.cve.org/CVERecord?id=CVE-2025-5987","licence":"CVE Terms of Use","modified":"2026-11-23T22:38:40.610Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-5987","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-5987","licence":"Public domain","modified":"2026-11-23T23:17:00.763Z"}],"updatedAt":"2026-11-25T22:59:00.726Z","epss":{"score":0.0173,"percentile":0.78273,"date":"2026-12-01T12:00:22.000Z"}}