Skip to main content
No exploitation reportedFix available

CVE-2025-5318

Libssh: out-of-bounds read in sftp_handle()

No exploitation reported by the sources we read.

  • Published2025-06-24
  • Fixed in0.11.2
  • WeaknessCWE-125

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

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.

Timeline

dates in UTC
  1. 2025-06-2414:10CVE publishedCNA

Versions per branch

NVD
Libssh
BranchAffectedFixed in
0.11< 0.11.20.11.2
Redhat enterprise linux
BranchAffectedFixed in
8.0= 8.0no fix published
9.0= 9.0no fix published
10.0= 10.0no fix published
Redhat openshift container platform
BranchAffectedFixed in
4.0= 4.0no fix published

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Products declared by the CNA37 products

As redhat, the CNA that assigned this CVE, declared them in the CVE record; versions as written.

31 more products in the CVE record.

Source: the CNA record (CVE Program), © The MITRE Corporation,CVE Terms of UseCVE recordupdated 2026-11-05

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • libsshWolfiall versions · fixed in 0.11.3-r0
  • libsshUbuntu:Pro:20.04:LTSall versions · fixed in 0.9.3-2ubuntu2.5+esm1
  • libsshUbuntu:Pro:18.04:LTSall versions · fixed in 0.8.0~20170825.94fa1e38-1ubuntu0.7+esm4
  • libsshUbuntu:Pro:16.04:LTSall versions · fixed in 0.6.3-4.3ubuntu0.6+esm2
  • libsshUbuntu:24.04:LTSall versions · fixed in 0.10.6-2ubuntu0.1
  • libsshUbuntu:22.04:LTSall versions · fixed in 0.9.6-2ubuntu0.22.04.4
  • libsshTuxCare:CentOS:8.5all versions · fixed in 0.9.4-3.el8.tuxcare.els5and 2 other packages
  • libsshTuxCare:CentOS:8.4all versions · fixed in 0.9.4-3.el8.tuxcare.els5and 2 other packages

95 more package ranges on OSV.dev

Vendor advisories

  • CVE-2025-5318 Red Hat Product Security442 products fixed · 1 known affected

    libssh: out-of-bounds read in sftp_handle()

    openshift/ose-rhel-coreos-9 as a component of Red Hat OpenShift Container Platform 4

  • RHSA-2026:3462 Red Hat Product Security1 product fixed

    Red Hat Security Advisory: Red Hat AI Inference Server 3.2.2 (ROCm)

  • RHSA-2026:3461 Red Hat Product Security2 products fixed

    Red Hat Security Advisory: Red Hat AI Inference Server 3.2.2 (CUDA)

  • RHSA-2026:1541 Red Hat Product Security4 products fixed

    Red Hat Security Advisory: OpenShift Container Platform 4.15.61 bug fix and security update

  • RHSA-2026:0326 Red Hat Product Security4 products fixed

    Red Hat Security Advisory: OpenShift Container Platform 4.16.55 bug fix and security update

  • RHSA-2025:23080 Red Hat Product Security2 products fixed

    Red Hat Security Advisory: Red Hat AI Inference Server Model Optimization Tools 3.2.2 (CUDA)

22 more advisories

Full record on NVD

Fix

  1. Update Libssh to 0.11.2
  2. Vendor fix Red Hat Product Security RHSA-2026:3462 · 1 productFor more information visit https://access.redhat.com/errata/RHSA-2026:3462
  3. Vendor fix Red Hat Product Security RHSA-2026:3461 · 2 productsFor more information visit https://access.redhat.com/errata/RHSA-2026:3461
  4. Vendor fix Red Hat Product Security RHSA-2026:1541 · 4 productsFor OpenShift Container Platform 4.15 see the following documentation, which will be updated shortly for this release, for important instructions on how to upgrade your cluster and fully apply this asynchronous errata update: https://docs.redhat.com/en/documentation/openshift_container_platform/4.…
  5. Vendor fix Red Hat Product Security RHSA-2026:0326 · 4 productsFor OpenShift Container Platform 4.16 see the following documentation, which will be updated shortly for this release, for important instructions on how to upgrade your cluster and fully apply this asynchronous errata update: https://docs.redhat.com/en/documentation/openshift_container_platform/4.…
  6. Vendor fix Red Hat Product Security RHSA-2025:23080 · 2 productsFor more information visit https://access.redhat.com/errata/RHSA-2025:23080
  7. Vendor fix Red Hat Product Security RHSA-2025:23079 · 1 productFor more information visit https://access.redhat.com/errata/RHSA-2025:23079

Advisories and patches

Detection

Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
Metasploit modules
none listed
Metasploit Framework

Sources

Identifiers

Technical details

CVSS v3 Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
Published
2025-06-24
Last Modified
2026-11-05
NVD status
Modified
GitHub Advisory
GHSA-98qw-prqm-9f4p

Frequently asked questions

What is 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.

Is CVE-2025-5318 actively exploited?

Active exploitation of CVE-2025-5318 has not been confirmed. Its EPSS score was 1.9% on 2026-11-08, the estimated probability of exploitation in the next 30 days.

What is the CVSS score for CVE-2025-5318?

CVE-2025-5318 has a CVSS v3 base score of 8.1 (HIGH severity), with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H.

Running libssh? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website lookups · 250 API requests/month

Sources for this record