{"id":"CVE-2025-5318","summary":"Libssh: out-of-bounds read in sftp_handle()","details":"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.","modified":"2026-11-17T07:03:35.861186913Z","published":"2025-06-24T14:10:07.188Z","related":["ALSA-2025:18231","ALSA-2025:18275","ALSA-2025:18286","ALSA-2025:20943","ALSA-2025:21013","SUSE-SU-2025:02229-1","SUSE-SU-2025:02278-1","SUSE-SU-2025:02279-1","SUSE-SU-2025:02281-1","SUSE-SU-2025:02755-1","SUSE-SU-2025:20557-1","SUSE-SU-2025:20596-1","openSUSE-SU-2025:15243-1"],"database_specific":{"cna_assigner":"redhat","cwe_ids":["CWE-125"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/5xxx/CVE-2025-5318.json","unresolved_ranges":[{"extracted_events":[{"range":[{"fixed":"0:0.11.1-4.el10_0"},{"fixed":"0:0.11.1-4.el10_1"},{"fixed":"0:0.9.6-15.el8_10"},{"fixed":"0:0.9.6-15.el8_10"},{"fixed":"0:0.9.0-4.el8_2.1"},{"fixed":"0:0.9.4-2.el8_4.1"},{"fixed":"0:0.9.4-2.el8_4.1"},{"fixed":"0:0.9.6-4.el8_6.1"},{"fixed":"0:0.9.6-4.el8_6.1"},{"fixed":"0:0.9.6-4.el8_6.1"},{"fixed":"0:0.9.6-13.el8_8.1"},{"fixed":"0:0.9.6-13.el8_8.1"},{"fixed":"0:0.10.4-15.el9_6"},{"fixed":"0:0.10.4-15.el9_7"},{"fixed":"0:0.10.4-15.el9_6"},{"fixed":"0:0.10.4-15.el9_7"},{"fixed":"0:0.9.6-3.el9_0.1"},{"fixed":"0:0.10.4-9.el9_2.1"},{"fixed":"0:0.10.4-13.el9_4.1"},{"fixed":"412.86.202511191939-0"},{"fixed":"413.92.202511261311-0"},{"fixed":"414.92.202511122212-0"},{"fixed":"415.92.202601271320-0"},{"fixed":"416.94.202601071926-0"},{"fixed":"417.94.202510282022-0"},{"fixed":"418.94.202511041748-0"},{"fixed":"4.19.9.6.202510281054-0"},{"fixed":"4.20.9.6.202510290321-0"},{"fixed":"3.2.2-1765379088"},{"fixed":"3.2.2-1765379049"},{"fixed":"3.2.2-1764871796"},{"fixed":"1772160593"},{"fixed":"1772160625"}],"source":"AFFECTED_FIELD","strategy":"InverseAffectedRanges"}]},{"extracted_events":[{"range":[{"fixed":"0.11.2"}],"source":"AFFECTED_FIELD","strategy":"StandardRange"}]}]},"references":[{"type":"WEB","url":"https://access.redhat.com/downloads/content/package-browser/"},{"type":"WEB","url":"https://catalog.redhat.com/software/containers/"},{"type":"WEB","url":"https://www.libssh.org/"},{"type":"ADVISORY","url":"https://access.redhat.com/errata/RHSA-2025:18231"},{"type":"ADVISORY","url":"https://access.redhat.com/errata/RHSA-2025:18275"},{"type":"ADVISORY","url":"https://access.redhat.com/errata/RHSA-2025:18286"},{"type":"ADVISORY","url":"https://access.redhat.com/errata/RHSA-2025:19012"},{"type":"ADVISORY","url":"https://access.redhat.com/errata/RHSA-2025:19098"},{"type":"ADVISORY","url":"https://access.redhat.com/errata/RHSA-2025:19101"},{"type":"ADVISORY","url":"https://access.redhat.com/errata/RHSA-2025:19295"},{"type":"ADVISORY","url":"https://access.redhat.com/errata/RHSA-2025:19300"},{"type":"ADVISORY","url":"https://access.redhat.com/errata/RHSA-2025:19313"},{"type":"ADVISORY","url":"https://access.redhat.com/errata/RHSA-2025:19400"},{"type":"ADVISORY","url":"https://access.redhat.com/errata/RHSA-2025:19401"},{"type":"ADVISORY","url":"https://access.redhat.com/errata/RHSA-2025:19470"},{"type":"ADVISORY","url":"https://access.redhat.com/errata/RHSA-2025:19472"},{"type":"ADVISORY","url":"https://access.redhat.com/errata/RHSA-2025:19807"},{"type":"ADVISORY","url":"https://access.redhat.com/errata/RHSA-2025:19864"},{"type":"ADVISORY","url":"https://access.redhat.com/errata/RHSA-2025:20943"},{"type":"ADVISORY","url":"https://access.redhat.com/errata/RHSA-2025:21013"},{"type":"ADVISORY","url":"https://access.redhat.com/errata/RHSA-2025:21329"},{"type":"ADVISORY","url":"https://access.redhat.com/errata/RHSA-2025:21829"},{"type":"ADVISORY","url":"https://access.redhat.com/errata/RHSA-2025:22275"},{"type":"ADVISORY","url":"https://access.redhat.com/errata/RHSA-2025:23078"},{"type":"ADVISORY","url":"https://access.redhat.com/errata/RHSA-2025:23079"},{"type":"ADVISORY","url":"https://access.redhat.com/errata/RHSA-2025:23080"},{"type":"ADVISORY","url":"https://access.redhat.com/errata/RHSA-2026:0326"},{"type":"ADVISORY","url":"https://access.redhat.com/errata/RHSA-2026:1541"},{"type":"ADVISORY","url":"https://access.redhat.com/errata/RHSA-2026:3461"},{"type":"ADVISORY","url":"https://access.redhat.com/errata/RHSA-2026:3462"},{"type":"ADVISORY","url":"https://access.redhat.com/security/cve/CVE-2025-5318"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/5xxx/CVE-2025-5318.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-5318"},{"type":"ADVISORY","url":"https://www.libssh.org/security/advisories/CVE-2025-5318.txt"},{"type":"REPORT","url":"https://bugzilla.redhat.com/show_bug.cgi?id=2369131"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://gitlab.com/libssh/libssh-mirror","events":[{"introduced":"0"},{"fixed":"dff6c0821ed54f6fbf5b755af43f54cbb723b1b1"}],"database_specific":{"extracted_events":[{"cpe":"cpe:2.3:a:libssh:libssh:*:*:*:*:*:*:*:*","range":[{"introduced":"0"},{"fixed":"0.11.2"}],"source":"CPE_RANGE"}]}}],"versions":["libssh-0.11.1","libssh-0.11.0","libssh-0.8.0","release-0-3-0"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-5318.json"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N"}]}