Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2025-5987: Return of Wrong Status Code

0
Medium
VulnerabilityCVE-2025-5987cvecve-2025-5987
Published: Mon Jul 07 2025 (07/07/2025, 14:24:12 UTC)
Source: CVE Database V5
Vendor/Project: Red Hat
Product: Red Hat Enterprise Linux 10

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.

AI-Powered Analysis

AILast updated: 11/20/2025, 21:39:37 UTC

Technical Analysis

CVE-2025-5987 is a vulnerability discovered in libssh version 0.10.0, specifically when configured to use the ChaCha20 cipher in conjunction with the OpenSSL library. The root cause is an error handling flaw: when heap space is exhausted, OpenSSL returns an error code that aliases with SSH_OK, the code indicating success. Libssh fails to detect this error condition properly and proceeds to use a partially initialized cipher context. This improper initialization can lead to undefined behavior including potential compromise of data confidentiality and integrity, or cause application crashes. The vulnerability requires an attacker to induce heap exhaustion, which is a non-trivial but feasible attack vector, and only low privileges are needed to exploit it. No user interaction is required, and the attack can be performed remotely over the network (AV:N). The CVSS v3.1 score is 5.0 (medium severity), reflecting the moderate impact on confidentiality, integrity, and availability, combined with the complexity of exploitation. The affected product is Red Hat Enterprise Linux 10, a widely used enterprise-grade Linux distribution, particularly in server environments. No patches were linked at the time of disclosure, and no known exploits have been reported in the wild. The vulnerability highlights the importance of robust error handling in cryptographic libraries, especially when integrating third-party components like OpenSSL.

Potential Impact

For European organizations, this vulnerability could undermine the security of SSH communications, a critical protocol for remote management and secure data transfer. Compromise of confidentiality and integrity could lead to unauthorized data disclosure or manipulation, potentially affecting sensitive business operations and regulatory compliance (e.g., GDPR). The possibility of application crashes could disrupt services, impacting availability. Organizations relying on Red Hat Enterprise Linux 10 servers for critical infrastructure, cloud services, or internal operations may face increased risk. Although exploitation requires inducing heap exhaustion, which may limit attack feasibility, targeted attacks by skilled adversaries remain a concern. The lack of known exploits currently reduces immediate risk but does not eliminate the threat. Given the widespread use of SSH in European IT environments, the vulnerability could have broad implications if exploited at scale.

Mitigation Recommendations

Organizations should monitor Red Hat and libssh security advisories closely and apply patches promptly once available. In the interim, consider disabling the ChaCha20 cipher in libssh configurations if feasible, to avoid triggering the vulnerable code path. Implement resource limits and monitoring to detect and prevent heap exhaustion conditions. Employ network-level protections such as firewalls and intrusion detection systems to limit exposure of SSH services to untrusted networks. Conduct regular audits of SSH configurations and usage to ensure adherence to best practices. Additionally, consider deploying application-layer monitoring to detect unusual SSH behavior or crashes indicative of exploitation attempts. Engage with vendors for timely updates and validate that OpenSSL and libssh libraries are updated to versions that address this flaw.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
redhat
Date Reserved
2025-06-10T21:55:45.552Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 686bdc1a6f40f0eb72e9f8ac

Added to database: 7/7/2025, 2:39:22 PM

Last enriched: 11/20/2025, 9:39:37 PM

Last updated: 11/22/2025, 12:49:08 PM

Views: 62

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats