Summary
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. An
attacker could possibly use this issue to cause libssh to crash, resulting
in a denial of service. This issue only affected Ubuntu 24.04 LTS, Ubuntu
24.10, and Ubuntu 25.04. (CVE-2025-5351)
Ronald Crane discovered that libssh incorrectly handled the ssh_kdf()
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-5372)
Ronald Crane discovered that libssh incorrectly handled the ChaCha20
cipher. An attacker could possibly use this issue to cause libssh to
use partially initialized cypher content. This issue only affected Ubuntu
24.04 LTS, Ubuntu 24.10, and Ubuntu 25.04. (CVE-2025-5987)
Fixed packages 2
| Release | Package | Fixed in |
|---|---|---|
| Ubuntu · 22.04 LTS 22.04:LTS | libssh | 0.9.6-2ubuntu0.22.04.4 |
| Ubuntu · 24.04 LTS 24.04:LTS | libssh | 0.10.6-2ubuntu0.1 |
Vulnerabilities 7
-
High 8.1
Libssh: invalid return code for chacha20 poly1305 with openssl backend
A flaw was found in libssh when using the ChaCha20 cipher with the OpenSSL library. If an attacker manages to exhaust the heap space, this error is not detected and may lead to libssh using a partially initialized cipher context. This occurs because the OpenS…
-
Medium 6.5
Libssh: double free vulnerability in libssh key export functions
A flaw was found in the key export functionality of libssh. The issue occurs in the internal function responsible for converting cryptographic keys into serialized formats. During error handling, a memory structure is freed but not cleared, leading to a poten…
-
Medium 6.5
Libssh: integer overflow in libssh sftp server packet length validation leading to denial of service
A flaw was found in the SFTP server message decoding logic of libssh. The issue occurs due to an incorrect packet length check that allows an integer overflow when handling large payload sizes on 32-bit systems. This issue leads to failed memory allocation an…
-
Medium 5.4
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 …
-
Medium 5.0
Libssh: incorrect return code handling in ssh_kdf() in libssh
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…
-
Medium 4.5
Libssh: write beyond bounds in binary to base64 conversion functions
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 u…
-
Low 3.6
Libssh: use of uninitialized variable in privatekey_from_file()
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 failur…
References
-
report
https://ubuntu.com/security/CVE-2025-4877
-
report
https://ubuntu.com/security/CVE-2025-4878
-
report
https://ubuntu.com/security/CVE-2025-5318
-
report
https://ubuntu.com/security/CVE-2025-5351
-
report
https://ubuntu.com/security/CVE-2025-5372
-
report
https://ubuntu.com/security/CVE-2025-5449
-
report
https://ubuntu.com/security/CVE-2025-5987