CVE-2025-5318
published 2025-06-24CVE-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…
PriorityP349high8.1CVSS 3.1
AVNACLPRLUINSUCHINAH
EPSS
2.45%
82.5th percentile
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.
Affected
19 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| debian | libssh | < libssh 0.10.6-0+deb12u2 (bookworm) | libssh 0.10.6-0+deb12u2 (bookworm) |
| libssh | libssh | < 0.11.2 | 0.11.2 |
| libssh | libssh | >= 0 < 0.9.8-0+deb11u2 | 0.9.8-0+deb11u2 |
| libssh | libssh | >= 0 < 0.10.6-0+deb12u2 | 0.10.6-0+deb12u2 |
| libssh | libssh | >= 0 < 0.11.2-1 | 0.11.2-1 |
| libssh | libssh | >= 0 < 0.11.2-1 | 0.11.2-1 |
| libssh | libssh | >= 0 < 0.9.6-2ubuntu0.22.04.4 | 0.9.6-2ubuntu0.22.04.4 |
| libssh | libssh | >= 0 < 0.10.6-2ubuntu0.1 | 0.10.6-2ubuntu0.1 |
| libssh | libssh | >= 0 < 0.6.3-4.3ubuntu0.6+esm2 | 0.6.3-4.3ubuntu0.6+esm2 |
| libssh | libssh | >= 0 < 0.8.0~20170825.94fa1e38-1ubuntu0.7+esm4 | 0.8.0~20170825.94fa1e38-1ubuntu0.7+esm4 |
| libssh | libssh | >= 0 < 0.9.3-2ubuntu2.5+esm1 | 0.9.3-2ubuntu2.5+esm1 |
| msrc | azl3_libssh_0.10.6-1_on_azure_linux_3.0 | — | — |
| msrc | azl3_libssh_0.10.6-2_on_azure_linux_3.0 | — | — |
| msrc | cbl2_libssh_0.10.6-1_on_cbl_mariner_2.0 | — | — |
| msrc | cbl2_libssh_0.10.6-2_on_cbl_mariner_2.0 | — | — |
| redhat | enterprise_linux | — | — |
| redhat | enterprise_linux | — | — |
| redhat | enterprise_linux | — | — |
| redhat | openshift_container_platform | — | — |
CVSS provenance
nvdv3.18.1HIGHCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
osv8.1HIGH
vendor_debian8.1HIGH
vendor_redhat8.1HIGH
vendor_msrc5.4MEDIUM
vendor_oracle5.4HIGH
vendor_ubuntu4.5MEDIUM
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
Oracle
Oracle Oracle Communications Risk Matrix: Security (libssh) — CVE-2025-5318
vendor_oracle·2026-01-15·CVSS 5.4
CVE-2025-5318 [HIGH] Oracle Oracle Communications Risk Matrix: Security (libssh) — CVE-2025-5318
Oracle Oracle Communications Risk Matrix: Security (libssh) vulnerability
CVE: CVE-2025-5318
CVSS: 5.4
Protocol: HTTP
Remote exploit: No
Affected versions: Network
Advisory: cpujan2026 (JAN 2026)
Oracle
Oracle Oracle Communications Applications Risk Matrix: Security (libssh) — CVE-2025-5318
vendor_oracle·2025-10-15·CVSS 5.4
CVE-2025-5318 [HIGH] Oracle Oracle Communications Applications Risk Matrix: Security (libssh) — CVE-2025-5318
Oracle Oracle Communications Applications Risk Matrix: Security (libssh) vulnerability
CVE: CVE-2025-5318
CVSS: 5.4
Protocol: HTTP
Remote exploit: No
Affected versions: Network
Advisory: cpuoct2025 (OCT 2025)
Ubuntu
libssh vulnerabilities
vendor_ubuntu·2025-08-14·CVSS 4.5
CVE-2025-4877 [MEDIUM] libssh vulnerabilities
Title: libssh vulnerabilities
Summary: Several security issues were fixed in libssh.
Ronald Crane discovered that libssh incorrectly handled certain base64
conversions. An attacker could use this issue to cause libssh to crash,
resulting in a denial of service, or possibly execute arbitrary code.
(CVE-2025-4877)
Ronald Crane discovered that libssh incorrectly handled the
privatekey_from_file() function. An attacker could use this issue to cause
libssh to crash, resulting in a denial of service, or possibly execute
arbitrary code. (CVE-2025-4878)
Ronald Crane discovered that libssh incorrectly handled certain memory
operations in the sftp server. An attacker could possibly use this issue
to cause libssh to crash, resulting in a denial of service.
(CVE-2025-5318)
Instructions: In genera
Ubuntu
libssh vulnerabilities
vendor_ubuntu·2025-07-07·CVSS 4.5
CVE-2025-5351 [MEDIUM] libssh vulnerabilities
Title: libssh vulnerabilities
Summary: Several security issues were fixed in libssh.
Ronald Crane discovered that libssh incorrectly handled certain base64
conversions. An attacker could use this issue to cause libssh to crash,
resulting in a denial of service, or possibly execute arbitrary code.
(CVE-2025-4877)
Ronald Crane discovered that libssh incorrectly handled the
privatekey_from_file() function. An attacker could use this issue to cause
libssh to crash, resulting in a denial of service, or possibly execute
arbitrary code. (CVE-2025-4878)
Ronald Crane discovered that libssh incorrectly handled certain memory
operations in the sftp server. An attacker could possibly use this issue
to cause libssh to crash, resulting in a denial of service.
(CVE-2025-5318, CVE-2025-5449)
Ronald C
Red Hat
libssh: out-of-bounds read in sftp_handle()
vendor_redhat·2025-06-24·CVSS 8.1
CVE-2025-5318 [HIGH] CWE-125 libssh: out-of-bounds read in sftp_handle()
libssh: out-of-bounds read in sftp_handle()
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.
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 poi
Microsoft
Libssh: out-of-bounds read in sftp_handle()
vendor_msrc·2025-06-10·CVSS 5.4
CVE-2025-5318 [HIGH] CWE-125 Libssh: out-of-bounds read in sftp_handle()
Libssh: out-of-bounds read in sftp_handle()
FAQ: Is Azure Linux the only Microsoft product that includes this open-source library and is therefore potentially affected by this vulnerability?
One of the main benefits to our customers who choose to use the Azure Linux distro is the commitment to keep it up to date with the most recent and most secure versions of the open source libraries with which the distro is composed. Microsoft is committed to transparency in this work which is why we began publishing CSAF/VEX in October 2025. See this blog post for more information. If impact to additional products is identified, we will update the CVE to reflect this.
Mariner: Mariner
redhat: redhat
Customer Action Required: Yes
Remediation: CBL-Mariner Releases
Reference: https://learn.microsoft
Debian
CVE-2025-5318: libssh - A flaw was found in the libssh library in versions less than 0.11.2. An out-of-b...
vendor_debian·2025·CVSS 8.1
CVE-2025-5318 [HIGH] CVE-2025-5318: libssh - A flaw was found in the libssh library in versions less than 0.11.2. An out-of-b...
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.
Scope: local
bookworm: resolved (fixed in 0.10.6-0+deb12u2)
bullseye: resolved (fixed in 0.9.8-0+deb11u2)
forky: resolved (fixed in 0.11.2-1)
sid: resolved (fixed in 0.11.2-1)
trixie: resolved (fixed in 0.11.2-1)
OSV
libssh vulnerabilities
osv·2025-08-14·CVSS 4.5
CVE-2025-4877 [MEDIUM] libssh vulnerabilities
libssh vulnerabilities
Ronald Crane discovered that libssh incorrectly handled certain base64
conversions. An attacker could use this issue to cause libssh to crash,
resulting in a denial of service, or possibly execute arbitrary code.
(CVE-2025-4877)
Ronald Crane discovered that libssh incorrectly handled the
privatekey_from_file() function. An attacker could use this issue to cause
libssh to crash, resulting in a denial of service, or possibly execute
arbitrary code. (CVE-2025-4878)
Ronald Crane discovered that libssh incorrectly handled certain memory
operations in the sftp server. An attacker could possibly use this issue
to cause libssh to crash, resulting in a denial of service.
(CVE-2025-5318)
OSV
libssh vulnerabilities
osv·2025-07-07·CVSS 4.5
CVE-2025-4877 [MEDIUM] libssh vulnerabilities
libssh vulnerabilities
Ronald Crane discovered that libssh incorrectly handled certain base64
conversions. An attacker could use this issue to cause libssh to crash,
resulting in a denial of service, or possibly execute arbitrary code.
(CVE-2025-4877)
Ronald Crane discovered that libssh incorrectly handled the
privatekey_from_file() function. An attacker could use this issue to cause
libssh to crash, resulting in a denial of service, or possibly execute
arbitrary code. (CVE-2025-4878)
Ronald Crane discovered that libssh incorrectly handled certain memory
operations in the sftp server. An attacker could possibly use this issue
to cause libssh to crash, resulting in a denial of service.
(CVE-2025-5318, CVE-2025-5449)
Ronald Crane discovered that libssh incorrectly handled exporting keys.
GHSA
GHSA-98qw-prqm-9f4p: A flaw was found in the libssh library
ghsa_unreviewed·2025-06-26
CVE-2025-5318 [MEDIUM] CWE-125 GHSA-98qw-prqm-9f4p: A flaw was found in the libssh library
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.
OSV
CVE-2025-5318: A flaw was found in the libssh library in versions less than 0
osv·2025-06-24·CVSS 8.1
CVE-2025-5318 [HIGH] CVE-2025-5318: A flaw was found in the libssh library in versions less than 0
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.
No detection rules found.
No public exploits indexed.
Bugzilla
CVE-2025-5318 libssh: out-of-bounds read in sftp_handle()
bugzilla·2025-05-29·CVSS 8.1
CVE-2025-5318 [HIGH] CVE-2025-5318 libssh: out-of-bounds read in sftp_handle()
CVE-2025-5318 libssh: out-of-bounds read in sftp_handle()
Out-of-Bounds Read vulnerability in the SFTP server implementation of libssh, specifically within the sftp_handle() function. The flaw is due to an incorrect boundary check that permits the function to access memory beyond the valid handle list. This leads to the return of an invalid pointer, which is subsequently used in further processing. Although the issue requires authenticated access to the server, it can be exploited by a remote attacker with valid credentials to potentially read unintended memory regions, which could expose sensitive information or affect service behavior.
Discussion:
Hi,
This is fixed in libssh-0.11.3.
Can someone help to update the status? (e.g. Fixed In Version:)
---
This issue has been addressed in
Bugzilla
CVE-2025-37739 kernel: f2fs: fix to avoid out-of-bounds access in f2fs_truncate_inode_blocks()
bugzilla·2025-05-01·CVSS 7.1
CVE-2025-37739 [HIGH] CVE-2025-37739 kernel: f2fs: fix to avoid out-of-bounds access in f2fs_truncate_inode_blocks()
CVE-2025-37739 kernel: f2fs: fix to avoid out-of-bounds access in f2fs_truncate_inode_blocks()
In the Linux kernel, the following vulnerability has been resolved:
f2fs: fix to avoid out-of-bounds access in f2fs_truncate_inode_blocks()
syzbot reports an UBSAN issue as below:
------------[ cut here ]------------
UBSAN: array-index-out-of-bounds in fs/f2fs/node.h:381:10
index 18446744073709550692 is out of range for type '__le32[5]' (aka 'unsigned int[5]')
CPU: 0 UID: 0 PID: 5318 Comm: syz.0.0 Not tainted 6.14.0-rc3-syzkaller-00060-g6537cfb395f3 #0
Call Trace:
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120
ubsan_epilogue lib/ubsan.c:231 [inline]
__ubsan_handle_out_of_bounds+0x121/0x150 lib/ubsan.c:429
get_nid fs/f2fs/node.h:381 [inline]
f2fs_tru
https://access.redhat.com/errata/RHSA-2025:18231https://access.redhat.com/errata/RHSA-2025:18275https://access.redhat.com/errata/RHSA-2025:18286https://access.redhat.com/errata/RHSA-2025:19012https://access.redhat.com/errata/RHSA-2025:19098https://access.redhat.com/errata/RHSA-2025:19101https://access.redhat.com/errata/RHSA-2025:19295https://access.redhat.com/errata/RHSA-2025:19300https://access.redhat.com/errata/RHSA-2025:19313https://access.redhat.com/errata/RHSA-2025:19400https://access.redhat.com/errata/RHSA-2025:19401https://access.redhat.com/errata/RHSA-2025:19470https://access.redhat.com/errata/RHSA-2025:19472https://access.redhat.com/errata/RHSA-2025:19807https://access.redhat.com/errata/RHSA-2025:19864https://access.redhat.com/errata/RHSA-2025:20943https://access.redhat.com/errata/RHSA-2025:21013https://access.redhat.com/errata/RHSA-2025:21329https://access.redhat.com/errata/RHSA-2025:21829https://access.redhat.com/errata/RHSA-2025:22275https://access.redhat.com/errata/RHSA-2025:23078https://access.redhat.com/errata/RHSA-2025:23079https://access.redhat.com/errata/RHSA-2025:23080https://access.redhat.com/errata/RHSA-2026:0326https://access.redhat.com/errata/RHSA-2026:1541https://access.redhat.com/errata/RHSA-2026:3461https://access.redhat.com/errata/RHSA-2026:3462https://access.redhat.com/security/cve/CVE-2025-5318https://bugzilla.redhat.com/show_bug.cgi?id=2369131https://www.libssh.org/security/advisories/CVE-2025-5318.txt
2025-06-24
Published