CVE-2025-5318 Libssh: out-of-bounds read in sftp_handle()
HighCVSS 8.1
EPSS 1.9%
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- No known exploitation · automatable: no · technical impact: total
- Technology
- UbuntuDebianRed Hat
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.
Upgrade path
22 packages: 21 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| alpine/libssh(Alpine v3.22) | < 0.11.2-r0 | 0.11.2-r0 | Fixed |
| alpine/libssh(Alpine v3.23) | < 0.11.2-r0 | 0.11.2-r0 | Fixed |
| alpine/libssh(Alpine v3.24) | < 0.11.2-r0 | 0.11.2-r0 | Fixed |
| azure linux libssh(Azure Linux 3.0) | < 0.10.6-2 | 0.10.6-2 | Fixed |
| cbl-mariner libssh(CBL-Mariner 2.0) | < 0.10.6-2 | 0.10.6-2 | Fixed |
| debian/libssh(Debian 12) | < 0.10.6-0+deb12u2; = 0.10.5-2; = 0.10.5-3; = 0.10.5-3+hurd.1 +1 more | 0.10.6-0+deb12u2 | Fixed |
| debian/libssh(Debian 13) | < 0.11.2-1 | 0.11.2-1 | Fixed |
| debian/libssh(Debian 14) | < 0.11.2-1 | 0.11.2-1 | Fixed |
| libssh | < 0.11.2 | 0.11.2 | Fixed |
| libssh | < 0.11.2 | 0.11.2 | Fixed |
| redhat ai inference server | < 3.2.2-1764871796; < 3.2.2-1765379049; < 3.2.2-1765379088; < 1772160593 +1 more | 3.2.2-1764871796, 3.2.2-1765379049, 3.2.2-1765379088, 1772160593, 1772160625 | Fixed |
| redhat enterprise linux | < 0:0.9.6-15.el8_10; < 0:0.10.4-15.el9_6; < 0:0.10.4-15.el9_7; < 0:0.11.1-4.el10_0 +4 more | 0:0.9.6-15.el8_10, 0:0.10.4-15.el9_6, 0:0.10.4-15.el9_7, 0:0.11.1-4.el10_0, 0:0.11.1-4.el10_1 | Fixed |
| redhat openshift | < 4.19.9.6.202510281054-0; < 4.20.9.6.202510290321-0; < 412.86.202511191939-0; < 413.92.202511261311-0 +5 more | 4.19.9.6.202510281054-0, 4.20.9.6.202510290321-0, 412.86.202511191939-0, 413.92.202511261311-0, 414.92.202511122212-0, 415.92.202601271320-0, 416.94.202601071926-0, 417.94.202510282022-0, 418.94.202511041748-0 | Fixed |
| redhat openshift distributed tracing | < rhosdt-3.7-1762254519; < rhosdt-3.7-1762254530; < rhosdt-3.7-1762254545; < rhosdt-3.7-1762254546 +2 more | rhosdt-3.7-1762254519, rhosdt-3.7-1762254530, rhosdt-3.7-1762254545, rhosdt-3.7-1762254546, rhosdt-3.7-1762254552, rhosdt-3.7-1762255881 | Fixed |
| redhat rhel aus | < 0:0.9.0-4.el8_2.1; < 0:0.9.4-2.el8_4.1; < 0:0.9.6-4.el8_6.1 | 0:0.9.0-4.el8_2.1, 0:0.9.4-2.el8_4.1, 0:0.9.6-4.el8_6.1 | Fixed |
| redhat rhel e4s | < 0:0.9.6-3.el9_0.1; < 0:0.9.6-4.el8_6.1; < 0:0.9.6-13.el8_8.1; < 0:0.10.4-9.el9_2.1 | 0:0.9.6-3.el9_0.1, 0:0.9.6-4.el8_6.1, 0:0.9.6-13.el8_8.1, 0:0.10.4-9.el9_2.1 | Fixed |
| redhat rhel eus | < 0:0.10.4-13.el9_4.1 | 0:0.10.4-13.el9_4.1 | Fixed |
| redhat rhel eus long life | < 0:0.9.4-2.el8_4.1 | 0:0.9.4-2.el8_4.1 | Fixed |
| redhat rhel tus | < 0:0.9.6-4.el8_6.1; < 0:0.9.6-13.el8_8.1 | 0:0.9.6-4.el8_6.1, 0:0.9.6-13.el8_8.1 | Fixed |
| ubuntu/libssh(Ubuntu 22.04) | < 0.9.6-2ubuntu0.22.04.4 | 0.9.6-2ubuntu0.22.04.4 | Fixed |
| ubuntu/libssh(Ubuntu 24.04) | < 0.10.6-2ubuntu0.1 | 0.10.6-2ubuntu0.1 | Fixed |
| redhat openshift container platform | = 4.0 | No fix listed | Versions listed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| cbl-mariner libssh(CBL-Mariner:2.0) | < 0.10.6-2 | 0.10.6-2 |
| azure linux libssh(Azure Linux:3.0) | < 0.10.6-2 | 0.10.6-2 |
| debian/libssh(Debian:12) | < 0.10.6-0+deb12u2 | 0.10.6-0+deb12u2 |
| debian/libssh(Debian:12) | = 0.10.5-2 | No fix listed |
| debian/libssh(Debian:12) | = 0.10.5-3 | No fix listed |
| debian/libssh(Debian:12) | = 0.10.5-3+hurd.1 | No fix listed |
| debian/libssh(Debian:12) | = 0.10.6-0+deb12u1 | No fix listed |
| debian/libssh(Debian:13) | < 0.11.2-1 | 0.11.2-1 |
| debian/libssh(Debian:14) | < 0.11.2-1 | 0.11.2-1 |
| libssh | < 0.11.2 | 0.11.2 |
| redhat enterprise linux | < 0:0.11.1-4.el10_0 | 0:0.11.1-4.el10_0 |
| redhat enterprise linux | < 0:0.11.1-4.el10_1 | 0:0.11.1-4.el10_1 |
| redhat enterprise linux | < 0:0.9.6-15.el8_10 | 0:0.9.6-15.el8_10 |
| redhat rhel aus | < 0:0.9.0-4.el8_2.1 | 0:0.9.0-4.el8_2.1 |
| redhat rhel aus | < 0:0.9.4-2.el8_4.1 | 0:0.9.4-2.el8_4.1 |
| redhat rhel eus long life | < 0:0.9.4-2.el8_4.1 | 0:0.9.4-2.el8_4.1 |
| redhat rhel aus | < 0:0.9.6-4.el8_6.1 | 0:0.9.6-4.el8_6.1 |
| redhat rhel e4s | < 0:0.9.6-4.el8_6.1 | 0:0.9.6-4.el8_6.1 |
| redhat rhel tus | < 0:0.9.6-4.el8_6.1 | 0:0.9.6-4.el8_6.1 |
| redhat rhel e4s | < 0:0.9.6-13.el8_8.1 | 0:0.9.6-13.el8_8.1 |
| redhat rhel tus | < 0:0.9.6-13.el8_8.1 | 0:0.9.6-13.el8_8.1 |
| redhat enterprise linux | < 0:0.10.4-15.el9_6 | 0:0.10.4-15.el9_6 |
| redhat enterprise linux | < 0:0.10.4-15.el9_7 | 0:0.10.4-15.el9_7 |
| redhat rhel e4s | < 0:0.9.6-3.el9_0.1 | 0:0.9.6-3.el9_0.1 |
| redhat rhel e4s | < 0:0.10.4-9.el9_2.1 | 0:0.10.4-9.el9_2.1 |
Show 30 more
| Product | Affected versions | Fixed in |
|---|---|---|
| redhat rhel eus | < 0:0.10.4-13.el9_4.1 | 0:0.10.4-13.el9_4.1 |
| redhat openshift | < 412.86.202511191939-0 | 412.86.202511191939-0 |
| redhat openshift | < 413.92.202511261311-0 | 413.92.202511261311-0 |
| redhat openshift | < 414.92.202511122212-0 | 414.92.202511122212-0 |
| redhat openshift | < 415.92.202601271320-0 | 415.92.202601271320-0 |
| redhat openshift | < 416.94.202601071926-0 | 416.94.202601071926-0 |
| redhat openshift | < 417.94.202510282022-0 | 417.94.202510282022-0 |
| redhat openshift | < 418.94.202511041748-0 | 418.94.202511041748-0 |
| redhat openshift | < 4.19.9.6.202510281054-0 | 4.19.9.6.202510281054-0 |
| redhat openshift | < 4.20.9.6.202510290321-0 | 4.20.9.6.202510290321-0 |
| redhat ai inference server | < 3.2.2-1765379088 | 3.2.2-1765379088 |
| redhat ai inference server | < 3.2.2-1765379049 | 3.2.2-1765379049 |
| redhat ai inference server | < 3.2.2-1764871796 | 3.2.2-1764871796 |
| redhat ai inference server | < 1772160593 | 1772160593 |
| redhat ai inference server | < 1772160625 | 1772160625 |
| redhat openshift distributed tracing | < rhosdt-3.7-1762254546 | rhosdt-3.7-1762254546 |
| redhat openshift distributed tracing | < rhosdt-3.7-1762254552 | rhosdt-3.7-1762254552 |
| redhat openshift distributed tracing | < rhosdt-3.7-1762255881 | rhosdt-3.7-1762255881 |
| redhat openshift distributed tracing | < rhosdt-3.7-1762254530 | rhosdt-3.7-1762254530 |
| redhat openshift distributed tracing | < rhosdt-3.7-1762254519 | rhosdt-3.7-1762254519 |
| redhat openshift distributed tracing | < rhosdt-3.7-1762254545 | rhosdt-3.7-1762254545 |
| ubuntu/libssh(Ubuntu:22.04) | < 0.9.6-2ubuntu0.22.04.4 | 0.9.6-2ubuntu0.22.04.4 |
| alpine/libssh(Alpine:v3.22) | < 0.11.2-r0 | 0.11.2-r0 |
| alpine/libssh(Alpine:v3.23) | < 0.11.2-r0 | 0.11.2-r0 |
| alpine/libssh(Alpine:v3.24) | < 0.11.2-r0 | 0.11.2-r0 |
| ubuntu/libssh(Ubuntu:24.04) | < 0.10.6-2ubuntu0.1 | 0.10.6-2ubuntu0.1 |
| redhat openshift container platform | = 4.0 | No fix listed |
| redhat enterprise linux | = 8.0 | No fix listed |
| redhat enterprise linux | = 9.0 | No fix listed |
| redhat enterprise linux | = 10.0 | No fix listed |
References
- MSRC Security Update Guide vendor-advisory
- CBL-Mariner Releases vendor-advisory
- Debian Security Tracker CVE-2025-5318 vendor-advisory
- RHSA-2025:18231 third-party-advisory vendor-advisory
- RHSA-2025:18275 third-party-advisory vendor-advisory
- RHSA-2025:18286 third-party-advisory vendor-advisory
- RHSA-2025:19012 third-party-advisory vendor-advisory
- RHSA-2025:19098 third-party-advisory vendor-advisory
- RHSA-2025:19101 third-party-advisory vendor-advisory
- RHSA-2025:19295 vendor-advisory
- RHSA-2025:19300 vendor-advisory
- RHSA-2025:19313 vendor-advisory
- RHSA-2025:19400 vendor-advisory
- RHSA-2025:19401 vendor-advisory
- RHSA-2025:19470 vendor-advisory
- RHSA-2025:19472 vendor-advisory
- RHSA-2025:19807 vendor-advisory
- RHSA-2025:19864 vendor-advisory
- RHSA-2025:20943 vendor-advisory
- RHSA-2025:21013 vendor-advisory
- RHSA-2025:21329 vendor-advisory
- RHSA-2025:21829 vendor-advisory
- RHSA-2025:22275 vendor-advisory
- RHSA-2025:23078 vendor-advisory
- RHSA-2025:23079 vendor-advisory
- RHSA-2025:23080 vendor-advisory
- RHSA-2026:0326 vendor-advisory
- RHSA-2026:1541 vendor-advisory
- RHSA-2026:3461 vendor-advisory
- RHSA-2026:3462 vendor-advisory
- access.redhat.com third-party-advisory vdb-entry
- RHBZ#2369131 issue-tracking third-party-advisory
- www.libssh.org vendor-advisory
- Ubuntu CVE tracker vendor-advisory
- USN-7619-1 vendor-advisory
- USN-7696-1 vendor-advisory
- www.cve.org
- security.alpinelinux.org vendor-advisory
- bugs.debian.org issue-tracking
- ENISA EUVD EUVD-2025-23900 third-party-advisory