Libssh: buffer underflow in ssh_get_hexa() on invalid input
The API function `ssh_get_hexa()` is vulnerable, when 0-lenght input is provided to this function. This function is used internally in `ssh_get_fingerprint_hash()` and `ssh_print_hexa()` (deprecated), which is vulnerable to the same input (length is provided by the calling application). The function is also used internally in the gssapi code for logging the OIDs received by the server during GSSAPI authentication. This could be triggered remotely, when the server allows GSSAPI authentication and logging verbosity is set at least to SSH_LOG_PACKET (3). This could cause self-DoS of the per-connection daemon process.
References
- https://access.redhat.com/security/cve/CVE-2026-0966 x_refsource_REDHAT vdb-entry
- RHBZ#2433121 issue-tracking x_refsource_REDHAT
- https://www.libssh.org/2026/02/10/libssh-0-12-0-and-0-11-4-security-releases/
Affected products
Matching in nixpkgs
pkgs.libssh
SSH client library
pkgs.libssh2
Client-side C library implementing the SSH2 protocol
pkgs.haskellPackages.libssh
libssh bindings
pkgs.haskellPackages.libssh2
FFI bindings to libssh2 SSH2 client library (http://libssh2.org/)
-
nixos-unstable 0.2.0.9-unstable-2025-04-03
- nixpkgs-unstable 0.2.0.9-unstable-2025-04-03
- nixos-unstable-small 0.2.0.9-unstable-2025-04-03
-
nixos-25.11 0.2.0.9-unstable-2025-04-03
- nixos-25.11-small 0.2.0.9-unstable-2025-04-03
- nixpkgs-25.11-darwin 0.2.0.9-unstable-2025-04-03
pkgs.haskellPackages.libssh2-conduit
Conduit wrappers for libssh2 FFI bindings (see libssh2 package)
pkgs.python312Packages.ansible-pylibssh
Python bindings to client functionality of libssh specific to Ansible use case
pkgs.python313Packages.ansible-pylibssh
Python bindings to client functionality of libssh specific to Ansible use case
pkgs.python314Packages.ansible-pylibssh
Python bindings to client functionality of libssh specific to Ansible use case
Package maintainers
-
@svanderburg Sander van der Burg <s.vanderburg@tudelft.nl>
-
@SuperSandro2000 Sandro Jäckel <sandro.jaeckel@gmail.com>
-
@geluk Johan Geluk <johan+nix@geluk.io>
-
@mpscholten Marc Scholten <marc@digitallyinduced.com>
-
@wfdewith Wim de With <wf@dewith.io>