CVE-2025-5987: libssh - Undefined Behavior
- Cve: CVE-2025-5987
- Name: libssh - Undefined Behavior
- 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.
- Impact: Attackers can cause data confidentiality and integrity compromise or crashes by exploiting improper error handling.
- Remediation: Update libssh to the latest version with proper error handling for ChaCha20 cipher.
- Requirements: Attacker needs to exhaust heap space
- Labels source: projectdiscovery
- Severity: high
- Cvss score: 8.1
- Cvss vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
- Epss score: 0.0173
- Epss percentile: 0.7819
- Assignee: [email protected]
- Published at: 2025-07-07T15:15:28Z
- Age in days: 505
- Modified at: 2026-11-23T23:17:00Z
- Patch available: yes
- References total: 17
- Products total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2025-5987
- Nvd status: modified
- Checked, none or zero: vulnerability impact, known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, oss, projects total, projects, rejected by nvd
- Not known: vulnerability type, requirement type
Cwe
| Id | Name |
|---|---|
| CWE-393 | Return of Wrong Status Code |
Hackerone
- Reports: 1
- Rank: 5211
References
Same in every row:
- Source: nvd
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| libssh:libssh | >= 0.10.0, < 0.11.2 | no | nvd | /v1/products/libssh/libssh |
Index
- Checked, none or zero: repositories, repositories high signal, packages
Exploitation
- Remote: yes
- Hackerone reports: 1
- Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, authentication required
- Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, exposed hosts