Skip to content
VulniPulse
High8.1Vendor: MediumRed Hat Linux

High [CVE-2025-5987] Libssh: invalid return code for chacha20 poly1305 with openssl backend

This high-severity Red Hat Linux advisory covers CVE-2025-5987 affecting Red Hat Enterprise Linux 10.0 Extended Update Support, Red Hat Enterprise Linux 9.2 Update Services for SAP Solutions, Red Hat Enterprise Linux 9.4 Extended Update Support.

CVE-2025-5987 Published Jul 7, 2025Updated by vendor Apr 26, 2025
Affected products & platforms
Red Hat LinuxRed Hat Enterprise Linux
Open vendor advisory

Android app · Google Play

Monitor future Red Hat Linux CVEs from your phone.

Choose a whole vendor or a precise platform, then receive matching security advisories by phone notification, email, or both. Coverage follows 32 official vendor sources and 160+ reviewed platform categories.

Matching phone alertsOptional email delivery

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.

Red Hat Product Security Team has rated this vulnerability as having a Moderate security impact. This is due to the high complexity in exploiting this flaw.

For a successful attack to take place an attacker needs to manage to exhaust the heap space to for the OpenSSL library to return the error code which wrongly match the SSH_OK return code. Red Hat severity: Moderate — CVSS 8.1 (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H).

Weakness: CWE-393.

Affected products named by the advisory: Red Hat Enterprise Linux 10.0 Extended Update Support; Red Hat Enterprise Linux 9.2 Update Services for SAP Solutions; Red Hat Enterprise Linux 9.4 Extended Update Support; Red Hat Enterprise Linux 9.6 Extended Update Support; and 11 more.

Affected versions

No affected-version range was extracted from the source record. The vendor advisory is authoritative — check it before change work.

Official advisory · high-confidence parse· fetched 49 minutes ago·verify at source

Fixed versions
  • libssh-0:0.11.1-5.el10_1
  • libssh-0:0.11.1-4.el10_0.1
  • libssh-0:0.10.4-17.el9_7
  • libssh-0:0.10.4-9.el9_2.2
  • libssh-0:0.10.4-13.el9_4.2
  • libssh-0:0.10.4-15.el9_6.1
  • rhcos-413.92.202602240113-0
  • rhcos-414.92.202601191325-0
  • rhcos-415.92.202601271320-0
  • rhcos-416.94.202601160124-0
  • rhcos-417.94.202601120213-0
  • rhcos-418.94.202601202224-0
  • rhcos-4.19.9.6.202601260820-0
  • rhcos-4.20.9.6.202601211057-0
  • RHSA-2025:23484
  • RHSA-2026:0427
  • RHSA-2025:23483
  • RHSA-2026:0430
  • RHSA-2026:0431
  • RHSA-2026:0428
  • RHSA-2026:3415
  • RHSA-2026:0996
  • RHSA-2026:1541
  • RHSA-2026:0985
  • RHSA-2026:0702
  • RHSA-2026:0980
  • RHSA-2026:1539
  • RHSA-2026:0978

Official advisory · high-confidence parse· fetched 49 minutes ago·verify at source

Mitigation

Upgrade to a fixed release: libssh-0:0.11.1-5.el10_1, libssh-0:0.11.1-4.el10_0.1, libssh-0:0.10.4-17.el9_7, libssh-0:0.10.4-9.el9_2.2, libssh-0:0.10.4-13.el9_4.2, libssh-0:0.10.4-15.el9_6.1. That is the remediation for this advisory.

The vendor advisory may list additional interim mitigations or workarounds not captured here — review it before change work.

Official advisory · high-confidence parse· fetched 49 minutes ago·verify at source

Discussion(0)

No comments yet. Share field notes, upgrade gotchas, or questions — verify against the vendor advisory before acting on community advice.

Sign in to join the discussion.