Out-of-bounds Read in Libssh

CVE-2025-5318

A flaw was found in the libssh library in versions less than 0.11.2. An out-of-bounds read can be triggered in the sftp_handle function due to an incorrect comparison check that permits the function to access memory beyond the valid handle list and to return an invalid pointer, which is used in further processing. This vulnerability allows an authenticated remote attacker to potentially read unintended memory regions, exposing sensitive information or affect service behavior.

Vulnerability class: Buffer Overflow

EPSS: 0.024 (82.7th percentile) — read the EPSS interpretation.

CVSS v3 metric

CVSS v3 base score 5.4 (Medium). Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N.

Affected products

Weakness classification (CWE)

Public proof-of-concept exploits

References

Frequently asked questions

What is CVE-2025-5318?
CVE-2025-5318 is a medium-severity vulnerability in Libssh, classified under Out-of-bounds Read. CVSS score: 5.4/10. Published 2025-06-24.
How severe is CVE-2025-5318?
Medium severity. CVSS v3 base score is 5.4 out of 10.
Is CVE-2025-5318 known to be exploited?
1 public proof-of-concept repositories are indexed. Not currently listed in the CISA KEV catalog.