CVE-2025-5318: Libssh: out-of-bounds read in sftp_handle()
Vulnerability summary
CVE-2025-5318 is a medium (CVSS 5.4) Out-of-bounds Read vulnerability in libssh. EPSS estimates a 2.03% chance of exploitation in the next 30 days, higher than 81.6% of scored vulnerabilities.
Not severe (CVSS 5.4, network access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 12 · Related 12Timeline
- 24-06-2025PublishedVulnerability first disclosed.
- 05-11-2026Last modifiedVulnerability information updated.
Description
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.
CVSS metrics
8 scores · 8 sources · 1 version- OSV · Red hatEcosystem advisory · calculated5.4MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
- OSV · UbuntuEcosystem advisory · calculated8.1HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:HDiffers
- OSV · DebianEcosystem advisory · calculated5.4MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
- OSV · WolfiEcosystem advisory · calculated5.4MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
- OSV · ChainguardEcosystem advisory · calculated5.4MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
- NVDNIST5.4MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
- OSV · AlpineEcosystem advisory · calculated5.4MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
EPSS trend
Probability
2.03%
Chance of exploitation in the next 30 days
Percentile
82%
Versus all other CVEs
30-day change
Increase +0.14 pp
From 1.89% on 04-11-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, low-privilege account, no user interaction (CVSS vector). Other conditions: not stated in public data.
Redhat7 products
- enterprise_linux8.0 | 9.0 | 10.0
- openshift_container_platform4.0
- libssh< 0:0.11.1-4.el10_0 | < 0:0.10.4-15.el9_6 | < 0:0.9.6-15.el8_10 | < 0:0.10.4-13.el9_4.1 | < 0:0.9.6-4.el8_6.1 | < 0:0.9.6-13.el8_8.1 | < 0:0.9.0-4.el8_2.1 | < 0:0.9.4-2.el8_4.1 | < 0:0.10.4-9.el9_2.1 | < 0:0.9.6-3.el9_0.1 | < 0:0.10.4-15.el9_7 | < 0:0.11.1-4.el10_1
- libssh-config< 0:0.11.1-4.el10_0 | < 0:0.10.4-15.el9_6 | < 0:0.9.6-15.el8_10 | < 0:0.10.4-13.el9_4.1 | < 0:0.9.6-4.el8_6.1 | < 0:0.9.6-13.el8_8.1 | < 0:0.9.0-4.el8_2.1 | < 0:0.9.4-2.el8_4.1 | < 0:0.10.4-9.el9_2.1 | < 0:0.9.6-3.el9_0.1 | < 0:0.10.4-15.el9_7 | < 0:0.11.1-4.el10_1
- libssh-debuginfo< 0:0.11.1-4.el10_0 | < 0:0.10.4-15.el9_6 | < 0:0.9.6-15.el8_10 | < 0:0.10.4-13.el9_4.1 | < 0:0.9.6-4.el8_6.1 | < 0:0.9.6-13.el8_8.1 | < 0:0.9.0-4.el8_2.1 | < 0:0.9.4-2.el8_4.1 | < 0:0.10.4-9.el9_2.1 | < 0:0.9.6-3.el9_0.1 | < 0:0.10.4-15.el9_7 | < 0:0.11.1-4.el10_1
Chainguard2 products
- libssh< 0.11.3-r0
- libssh2< 1.11.1-r1
Wolfi2 products
- libssh< 0.11.3-r0
- libssh2< 1.11.1-r1
Alpine1 product
- libssh< 0.11.2-r0
Debian1 product
- libssh< 0.10.6-0+deb12u2 | < 0.11.2-1
Libssh1 product
- libssh< 0.11.2
Ubuntu1 product
- libssh< 0.6.3-4.3ubuntu0.6+esm2 | < 0.8.0~20170825.94fa1e38-1ubuntu0.7+esm4 | < 0.9.3-2ubuntu2.5+esm1 | < 0.9.6-2ubuntu0.22.04.4 | < 0.10.6-2ubuntu0.1
7 vendors · 15 products
References
54 links- access.redhat.com/errata/RHSA-2025:18231Vendor AdvisoryX Refsource REDHATAdvisoryThird Party Advisory
- access.redhat.com/errata/RHSA-2025:18275Vendor AdvisoryX Refsource REDHATAdvisoryThird Party Advisory
- access.redhat.com/errata/RHSA-2025:18286Vendor AdvisoryX Refsource REDHATAdvisoryThird Party Advisory
- access.redhat.com/errata/RHSA-2025:19012Vendor AdvisoryX Refsource REDHATAdvisoryThird Party Advisory
- access.redhat.com/errata/RHSA-2025:19098Vendor AdvisoryX Refsource REDHATAdvisoryThird Party Advisory
- access.redhat.com/errata/RHSA-2025:19101Vendor AdvisoryX Refsource REDHATAdvisoryThird Party Advisory
Show all 54 references
- access.redhat.com/security/cve/CVE-2025-5318VDB EntryX Refsource REDHATREPORTAdvisoryThird Party Advisory
- bugzilla.redhat.com/show_bug.cgi?id=2369131Issue TrackingX Refsource REDHATREPORTThird Party Advisory