CVE-2025-5318

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

Published Jun 24, 2025 CVSS 3.1 · 5.4 Medium EPSS 1.9% KEV · Not listed
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.

Remediation

Vendor Workaround

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-4385-1 libssh security update
EUVD EUVD EUVD-2025-23900 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.
Ubuntu USN Ubuntu USN USN-7619-1 libssh vulnerabilities
Ubuntu USN Ubuntu USN USN-7696-1 libssh vulnerabilities
References
Link Providers
https://access.redhat.com/errata/RHSA-2025:18231 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2025:18275 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2025:18286 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2025:19012 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2025:19098 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2025:19101 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2025:19295 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2025:19300 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2025:19313 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2025:19400 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2025:19401 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2025:19470 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2025:19472 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2025:19807 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2025:19864 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2025:20943 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2025:21013 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2025:21329 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2025:21829 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2025:22275 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2025:23078 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2025:23079 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2025:23080 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:0326 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:1541 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:3461 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:3462 cve-icon cve-icon
https://access.redhat.com/security/cve/CVE-2025-5318 cve-icon cve-icon
https://bugzilla.redhat.com/show_bug.cgi?id=2369131 cve-icon cve-icon
https://nvd.nist.gov/vuln/detail/CVE-2025-5318 cve-icon
https://www.cve.org/CVERecord?id=CVE-2025-5318 cve-icon
https://www.libssh.org/security/advisories/CVE-2025-5318.txt cve-icon cve-icon cve-icon
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
CPEs cpe:/a:redhat:openshift:4
Type Values Removed Values Added
CPEs cpe:/a:redhat:openshift:4
Type Values Removed Values Added
Metrics cvssV3_1

{'score': 8.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H'}

cvssV3_1

{'score': 5.4, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N'}

Type Values Removed Values Added
CPEs cpe:/o:redhat:rhivos:1
Vendors & Products Redhat rhivos
Type Values Removed Values Added
First Time appeared Redhat rhivos
CPEs cpe:/o:redhat:rhivos:1
Vendors & Products Redhat rhivos
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
CPEs cpe:/a:redhat:openshift:4.15::el9
References
Type Values Removed Values Added
Metrics cvssV3_1

{'score': 7.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:L'}

cvssV3_1

{'score': 8.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H'}

Type Values Removed Values Added
CPEs cpe:/a:redhat:openshift:4.16::el9
References
Type Values Removed Values Added
Metrics cvssV3_1

{'score': 5.4, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N'}

cvssV3_1

{'score': 7.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:L'}

Type Values Removed Values Added
First Time appeared Redhat ai Inference Server
CPEs cpe:/a:redhat:ai_inference_server:3.2::el9
Vendors & Products Redhat ai Inference Server
References
Type Values Removed Values Added
CPEs cpe:/a:redhat:openshift:4.13::el9
References
Type Values Removed Values Added
First Time appeared Redhat openshift Distributed Tracing
CPEs cpe:/a:redhat:openshift_distributed_tracing:3.7::el8
Vendors & Products Redhat openshift Distributed Tracing
References
Type Values Removed Values Added
CPEs cpe:/a:redhat:openshift:4.19::el9
References
Type Values Removed Values Added
CPEs cpe:/a:redhat:openshift:4.17::el9
References
Type Values Removed Values Added
CPEs cpe:/a:redhat:openshift:4 cpe:/a:redhat:openshift:4.20::el9
References
Type Values Removed Values Added
CPEs cpe:/a:redhat:rhel_e4s:9.0::appstream
cpe:/o:redhat:rhel_e4s:9.0::baseos
References
Type Values Removed Values Added
CPEs cpe:/a:redhat:rhel_e4s:9.2::appstream
cpe:/o:redhat:rhel_e4s:9.2::baseos
References
Type Values Removed Values Added
First Time appeared Redhat rhel Eus Long Life
CPEs cpe:/a:redhat:rhel_aus:8.4::appstream
cpe:/a:redhat:rhel_eus_long_life:8.4::appstream
cpe:/o:redhat:rhel_aus:8.4::baseos
cpe:/o:redhat:rhel_eus_long_life:8.4::baseos
Vendors & Products Redhat rhel Eus Long Life
References
Type Values Removed Values Added
CPEs cpe:/a:redhat:rhel_aus:8.2::appstream
cpe:/o:redhat:rhel_aus:8.2::baseos
References
Type Values Removed Values Added
CPEs cpe:/a:redhat:rhel_e4s:8.8::appstream
cpe:/a:redhat:rhel_tus:8.8::appstream
cpe:/o:redhat:rhel_e4s:8.8::baseos
cpe:/o:redhat:rhel_tus:8.8::baseos
References
Type Values Removed Values Added
First Time appeared Redhat rhel Aus
Redhat rhel E4s
Redhat rhel Tus
CPEs cpe:/a:redhat:rhel_aus:8.6::appstream
cpe:/a:redhat:rhel_e4s:8.6::appstream
cpe:/a:redhat:rhel_tus:8.6::appstream
cpe:/o:redhat:rhel_aus:8.6::baseos
cpe:/o:redhat:rhel_e4s:8.6::baseos
cpe:/o:redhat:rhel_tus:8.6::baseos
Vendors & Products Redhat rhel Aus
Redhat rhel E4s
Redhat rhel Tus
References
Type Values Removed Values Added
First Time appeared Redhat rhel Eus
CPEs cpe:/a:redhat:rhel_eus:9.4::appstream
cpe:/o:redhat:rhel_eus:9.4::baseos
Vendors & Products Redhat rhel Eus
References
Type Values Removed Values Added
CPEs cpe:/o:redhat:enterprise_linux:8 cpe:/a:redhat:enterprise_linux:8::appstream
cpe:/o:redhat:enterprise_linux:8::baseos
References
Type Values Removed Values Added
CPEs cpe:/o:redhat:enterprise_linux:9 cpe:/a:redhat:enterprise_linux:9::appstream
cpe:/o:redhat:enterprise_linux:9::baseos
References
Type Values Removed Values Added
CPEs cpe:/o:redhat:enterprise_linux:10 cpe:/o:redhat:enterprise_linux:10.0
References
Type Values Removed Values Added
CPEs cpe:/o:redhat:rhivos:1
Vendors & Products Redhat rhivos
Type Values Removed Values Added
First Time appeared Redhat rhivos
CPEs cpe:/o:redhat:rhivos:1
Vendors & Products Redhat rhivos
Type Values Removed Values Added
Description A flaw was found in the libssh library. 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. 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.
Type Values Removed Values Added
First Time appeared Libssh
Libssh libssh
Redhat openshift Container Platform
CPEs cpe:2.3:a:libssh:libssh:*:*:*:*:*:*:*:*
cpe:2.3:a:redhat:openshift_container_platform:4.0:*:*:*:*:*:*:*
cpe:2.3:o:redhat:enterprise_linux:10.0:*:*:*:*:*:*:*
cpe:2.3:o:redhat:enterprise_linux:8.0:*:*:*:*:*:*:*
cpe:2.3:o:redhat:enterprise_linux:9.0:*:*:*:*:*:*:*
Vendors & Products Libssh
Libssh libssh
Redhat openshift Container Platform
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description A flaw was found in the libssh library. 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.
Title Libssh: out-of-bounds read in sftp_handle()
First Time appeared Redhat
Redhat enterprise Linux
Redhat openshift
Weaknesses CWE-125
CPEs cpe:/a:redhat:openshift:4
cpe:/o:redhat:enterprise_linux:10
cpe:/o:redhat:enterprise_linux:8
cpe:/o:redhat:enterprise_linux:9
Vendors & Products Redhat
Redhat enterprise Linux
Redhat openshift
References
Metrics cvssV3_1

{'score': 5.4, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N'}