Name
libssh
Version
0.8.9
Type
library
Description
Multiplatform C library implementing the SSHv2 and SSHv1 protocol
Licenses
LGPL-2.1-only
PURL
-
CPE
cpe:2.3:*:libssh:libssh:0.8.9:*:*:*:*:*:*:*
Other Versions#
Patches#
#
Title
Author
Resolve
1
CVE-2025-5318: sftpserver: Fix possible buffer overrun
Jakub Jelen <jjelen@redhat.com>
CVE-2025-5318
2
CVE-2026-0966 doc: Update guided tour to use SHA256 fingerprints
Jakub Jelen <jjelen@redhat.com>
CVE-2026-0966
3
CVE-2023-48795: client side mitigation
Aris Adamantiadis <aris@0xbadc0de.be>
CVE-2023-48795
4
CVE-2023-6004: options: Simplify the hostname parsing in
Norbert Pocs <norbertpocs0@gmail.com>
CVE-2023-6004
5
CVE-2025-4878 Initialize pointers where possible
Jakub Jelen <jjelen@redhat.com>
CVE-2025-4878
6
CVE-2025-8277: ecdh: Free previously allocated pubkeys
Jakub Jelen <jjelen@redhat.com>
CVE-2025-8277
7
sftp: Fix out-of-bound read from sftp extensions
Jakub Jelen <jjelen@redhat.com>
CVE-2026-3731
8
CVE-2023-6004 misc: Add ipv6 link-local check for an ip
Norbert Pocs <norbertpocs0@gmail.com>
CVE-2023-6004
9
CVE-2025-4878 legacy: Properly check return value to avoid
Jakub Jelen <jjelen@redhat.com>
CVE-2025-4878
10
CVE-2023-6004: config_parser: Allow multiple '@' in usernames
Norbert Pocs <norbertpocs0@gmail.com>
CVE-2023-6004
11
CVE-2025-8277: Fix memory leak of unused ephemeral key
Francesco Rollo <eferollo@gmail.com>
CVE-2025-8277
12
tests/CMakeLists.txt: do not search ssh/sshd commands on host
Yi Zhao <yi.zhao@windriver.com>
13
CVE-2026-0966 misc: Avoid heap buffer underflow in ssh_get_hexa
Jakub Jelen <jjelen@redhat.com>
CVE-2026-0966
14
CVE-2025-8114: Fix NULL pointer dereference after allocation
Andreas Schneider <asn@cryptomilk.org>
CVE-2025-8114
15
CVE-2023-6004: misc: Add function to check allowed characters
Norbert Pocs <norbertpocs0@gmail.com>
CVE-2023-6004
16
CVE-2023-6004: config_parser: Check for valid syntax of a
Norbert Pocs <norbertpocs0@gmail.com>
CVE-2023-6004
17
CVE-2020-16135: Add missing NULL check for ssh_buffer_new()
Andreas Schneider <asn@cryptomilk.org>
CVE-2020-16135
18
CVE-2023-48795: Strip extensions from both kex lists for
Jakub Jelen <jjelen@redhat.com>
CVE-2023-48795
19
CVE-2023-48795: Server side mitigations
Aris Adamantiadis <aris@0xbadc0de.be>
CVE-2023-48795
20
CVE-2026-0964 scp: Reject invalid paths received through scp
Jakub Jelen <jjelen@redhat.com>
CVE-2026-0964
21
config: Move common parser functions to config_parser.c
Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
22
CVE-2025-4877 base64: Prevent integer overflow and potential OOB
Jakub Jelen <jjelen@redhat.com>
CVE-2025-4877
23
Fix regression in IPv6 addresses in hostname parsing
Jakub Jelen <jjelen@redhat.com>
CVE-2023-6004
24
CVE-2025-8277: mbedtls: Avoid leaking ecdh keys
Jakub Jelen <jjelen@redhat.com>
CVE-2025-8277
Vulnerabilities#
Name
Analysis
Description
Patched
A weakness has been identified in libssh up to 0.11.3. The impacted element is the function sftp_extensions_get_name/sftp_extensions_get_data of the file src/sftp.c of the component SFTP Extension Name Handler. Executing a manipulation of the argument idx can lead to out-of-bounds read. The attack may be performed from remote. Upgrading to version 0.11.4 and 0.12.0 is sufficient to resolve this issue. This patch is called 855a0853ad3abd4a6cd85ce06fce6d8d4c7a0b60. You should upgrade the affected component.
Exploitable
A flaw was found in libssh in which a malicious SFTP (SSH File Transfer Protocol) server can exploit this by sending a malformed 'longname' field within an `SSH_FXP_NAME` message during a file listing operation. This missing null check can lead to reading beyond allocated memory on the heap. This can cause unexpected behavior or lead to a denial of service (DoS) due to application crashes.
Exploitable
A flaw was found in libssh. A remote attacker, by controlling client configuration files or known_hosts files, could craft specific hostnames that when processed by the `match_pattern()` function can lead to inefficient regular expression backtracking. This can cause timeouts and resource exhaustion, resulting in a Denial of Service (DoS) for the client.
Patched
A flaw was found in libssh. The API function `ssh_get_hexa()` is vulnerable to a denial of service when processing zero-length input. This can be exploited remotely by an attacker during GSSAPI (Generic Security Service Application Program Interface) authentication if the server's logging verbosity is set to `SSH_LOG_PACKET (3)` or higher. Successful exploitation could lead to a self-Denial of Service of the per-connection daemon process.
Exploitable
A flaw was found in libssh where it can attempt to open arbitrary files during configuration parsing. A local attacker can exploit this by providing a malicious configuration file or when the system is misconfigured. This vulnerability could lead to a Denial of Service (DoS) by causing the system to try and access dangerous files, such as block devices or large system files, which can disrupt normal operations.
Patched
A malicious SCP server can send unexpected paths that could make the
client application override local files outside of working directory.
This could be misused to create malicious executable or configuration
files and make the user execute them under specific consequences.
This is the same issue as in OpenSSH, tracked as CVE-2019-6111.
Patched
A flaw was found in libssh's handling of key exchange (KEX) processes when a client repeatedly sends incorrect KEX guesses. The library fails to free memory during these rekey operations, which can gradually exhaust system memory. This issue can lead to crashes on the client side, particularly when using libgcrypt, which impacts application stability and availability.
Patched
A flaw was found in libssh, a library that implements the SSH protocol. When calculating the session ID during the key exchange (KEX) process, an allocation failure in cryptographic functions may lead to a NULL pointer dereference. This issue can cause the client or server to crash.
Exploitable
A flaw was found in libssh versions built with OpenSSL versions older than 3.0, specifically in the ssh_kdf() function responsible for key derivation. Due to inconsistent interpretation of return values where OpenSSL uses 0 to indicate failure and libssh uses 0 for success—the function may mistakenly return a success status even when key derivation fails. This results in uninitialized cryptographic key buffers being used in subsequent communication, potentially compromising SSH sessions' confidentiality, integrity, and availability.
Patched
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.
Patched
A vulnerability was found in libssh, where an uninitialized variable exists under certain conditions in the privatekey_from_file() function. This flaw can be triggered if the file specified by the filename doesn't exist and may lead to possible signing failures or heap corruption.
Patched
There's a vulnerability in the libssh package where when a libssh consumer passes in an unexpectedly large input buffer to ssh_get_fingerprint_hash() function. In such cases the bin_to_base64() function can experience an integer overflow leading to a memory under allocation, when that happens it's possible that the program perform out of bounds write leading to a heap corruption.
This issue affects only 32-bits builds of libssh.
Exploitable
A flaw was found in libssh. This vulnerability allows local man-in-the-middle attacks, security downgrades of SSH (Secure Shell) connections, and manipulation of trusted host information, posing a significant risk to the confidentiality, integrity, and availability of SSH communications via an insecure default configuration on Windows systems where the library automatically loads configuration files from the C:\etc directory, which can be created and modified by unprivileged local users.
Patched
A flaw was found in libssh. By utilizing the ProxyCommand or ProxyJump feature, users can exploit unchecked hostname syntax on the client. This issue may allow an attacker to inject malicious code into the command of the features mentioned through the hostname parameter.
Patched
The SSH transport protocol with certain OpenSSH extensions, found in OpenSSH before 9.6 and other products, allows remote attackers to bypass integrity checks such that some packets are omitted (from the extension negotiation message), and a client and server may consequently end up with a connection for which some security features have been downgraded or disabled, aka a Terrapin attack. This occurs because the SSH Binary Packet Protocol (BPP), implemented by these extensions, mishandles the handshake phase and mishandles use of sequence numbers. For example, there is an effective attack against SSH's use of ChaCha20-Poly1305 (and CBC with Encrypt-then-MAC). The bypass occurs in chacha20-poly1305@openssh.com and (if CBC is used) the -etm@openssh.com MAC algorithms. This also affects Maverick Synergy Java SSH API before 3.1.0-SNAPSHOT, Dropbear through 2022.83, Ssh before 5.1.1 in Erlang/OTP, PuTTY before 0.80, AsyncSSH before 2.14.2, golang.org/x/crypto before 0.17.0, libssh before 0.10.6, libssh2 through 1.11.0, Thorn Tech SFTP Gateway before 3.4.6, Tera Term before 5.1, Paramiko before 3.4.0, jsch before 0.2.15, SFTPGo before 2.5.6, Netgate pfSense Plus through 23.09.1, Netgate pfSense CE through 2.7.2, HPN-SSH through 18.2.0, ProFTPD before 1.3.8b (and before 1.3.9rc2), ORYX CycloneSSH before 2.3.4, NetSarang XShell 7 before Build 0144, CrushFTP before 10.6.0, ConnectBot SSH library before 2.2.22, Apache MINA sshd through 2.11.0, sshj through 0.37.0, TinySSH through 20230101, trilead-ssh2 6401, LANCOM LCOS and LANconfig, FileZilla before 3.66.4, Nova before 11.8, PKIX-SSH before 14.4, SecureCRT before 9.4.3, Transmit5 before 5.10.4, Win32-OpenSSH before 9.5.0.0p1-Beta, WinSCP before 6.2.2, Bitvise SSH Server before 9.32, Bitvise SSH Client before 9.33, KiTTY through 0.76.1.13, the net-ssh gem 7.2.0 for Ruby, the mscdex ssh2 module before 1.15.0 for Node.js, the thrussh library before 0.35.1 for Rust, and the Russh crate before 0.40.2 for Rust.
Patched
libssh 0.9.4 has a NULL pointer dereference in tftpserver.c if ssh_buffer_new returns NULL.