8.1

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

Modified
AliasesRHSA-2025:23483RHSA-2025:23484RHSA-2026:0427
Published 07-07-2025Last modified 23-11-2026

Vulnerability summary

CVE-2025-5987 is a high (CVSS 8.1) Return of Wrong Status Code vulnerability in libssh. EPSS estimates a 1.80% chance of exploitation in the next 30 days, higher than 79.3% of scored vulnerabilities.

Priority
Prioritisesevere

Severe, CVSS 8.1 (CVE.org); no exploitation reported by the 5 checked sources; EPSS 2% (FIRST, 04-12-2026)

Source freshness unavailable

How is this decided?
CVSS score
8.1/10
010
High · v3.1 (CVE.org)
EPSS score
1.80%
0%100%
Low · +0.07 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits0No public exploits recorded

Advisory lineage

Upstream 0 · Downstream 5 · Related 6

Timeline

  1. 07-07-2025
    PublishedVulnerability first disclosed.
  2. 23-11-2026
    Last modifiedVulnerability information updated.

Description

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.

CVSS metrics

8 scores · 8 sources · 1 version

EPSS trend

Probability

1.80%

Chance of exploitation in the next 30 days

Percentile

79%

Versus all other CVEs

30-day change

Increase +0.07 pp

From 1.73% on 04-11-2026

04-11-202604-12-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

Affected systems

Version check

Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.

Redhat5 products
  • libssh< 0:0.10.4-17.el9_7 | < 0:0.11.1-5.el10_1 | < 0:0.11.1-4.el10_0.1 | < 0:0.10.4-15.el9_6.1 | < 0:0.10.4-9.el9_2.2 | < 0:0.10.4-13.el9_4.2
  • libssh-config< 0:0.10.4-17.el9_7 | < 0:0.11.1-5.el10_1
  • libssh-debuginfo< 0:0.10.4-17.el9_7 | < 0:0.11.1-5.el10_1
  • libssh-debugsource< 0:0.10.4-17.el9_7 | < 0:0.11.1-5.el10_1
  • libssh-devel< 0:0.10.4-17.el9_7 | < 0:0.11.1-5.el10_1
Chainguard2 products
  • libssh< 0.11.3-r0
  • libssh2< 1.11.1-r1
Wolfi2 products
  • libssh< 0.11.3-r0
  • libssh2< 1.11.1-r1
Alpine1 product
  • libssh≥ 0.10.0, < 0.11.2-r0
Debian1 product
  • libssh< 0.10.6-0+deb12u2 | < 0.11.2-1
Libssh1 product
Ubuntu1 product
  • libssh< 0.10.6-2ubuntu0.1

7 vendors · 13 products

References

34 links
Show all 34 references