CVE Tools

CVE-2025-5372

Libssh: incorrect return code handling in ssh_kdf() in libssh

Published: Jul 4, 2025Updated: Jun 15, 2026 Sources: CVE List NVD BDUCWE-682

Description

A flaw was found in libssh versions built with OpenSSL versions older than 3.0, specifically in the ssh_kdf() function responsible for key derivation. Due to inconsistent interpretation of return values where OpenSSL uses 0 to indicate failure and libssh uses 0 for success—the function may mistakenly return a success status even when key derivation fails. This results in uninitialized cryptographic key buffers being used in subsequent communication, potentially compromising SSH sessions' confidentiality, integrity, and availability.

No summary for this CVE yet.

CVSS Vector Breakdown

AV:NAC:HPR:LUI:NS:UC:LI:LA:L
Exploitability
AV:NAttack Vector
Network
AC:HAttack Complexity
High
PR:LPrivileges Required
Low
UI:NUser Interaction
None
Scope
S:UScope
Unchanged
Impact
C:LConfidentiality
Low
I:LIntegrity
Low
A:LAvailability
Low

Weaknesses

Affected Products

libssh
oss-projectaka libssh2 (related, sometimes confused)
and 15 more affected products View all →

Exploitability

Official Patch Available
Workaround Available

References

and 19 more references View all →
Could not load news mentions.

Unlock Complete Vulnerability Intelligence

Get the full picture for CVE-2025-5372 and every CVE in our database. Create a free account — no credit card required.

Create Free Account
Plain-language analysis
Impact assessment and exploitation scenario in plain English
Attack graph visualization
Interactive attack path and kill chain mapping
Exploit details & PoC links
ExploitDB, Metasploit, GitHub PoCs with direct links
Nuclei scanner templates
Ready-to-use vulnerability scanner templates
Full remediation guide
Patch instructions, workarounds, and compliance impact
Interactive AI chat
Ask questions about this vulnerability in natural language
Related vulnerabilities
Semantically similar CVEs and attack patterns
REST API & MCP access
Integrate vulnerability data into your workflows