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

Published · last modified .

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.

EPSS exploit prediction

EPSS: 0.018 (78.1th percentile), scored .

Low probability of exploitation in the next 30 days, but still tracked. 78th percentile — 78.1% of CVEs in the catalogue have a lower EPSS than this one. How to read EPSS.

EPSS trend (30 days)EPSS over the last 30 days for CVE-2025-5318: held from 0.015 to 0.018.

EPSS over last 30 days · oldest: 0.015 · newest: 0.018 · change: +0.003

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.