Synopsis
The remote Amazon Linux 2023 host is missing a security update.
Description
It is, therefore, affected by multiple vulnerabilities as referenced in the ALAS2023-2025-1155 advisory.
The privatekey_from_file() uses an uninitialized variable under certainconditions, such as if the file specified by the filename argument doesn'texist. This causes the code to return an invalid private key.
This defect, in turn, might cause signing failure. The bug might also cause aUse-After-Free or corrupt the heap.
Note that privatekey_from_file() is a deprecated function and shouldn't be usedanymore! (CVE-2025-4878)
An incorrect comparison check allows to read beyond bounds in the sftp_handle() in the sftp server implementation. Thus an invalid pointer is returned as the handle and we try to continue using that.
(CVE-2025-5318)
pki_key_to_blob() can cause a double free on certain errors when using OpenSSL>= 3.0. The function is used by different other functions which allow toexport public or private keys to blobs or base64.
The function is using the variable params without resetting it to NULL afterfree. In case of low-memory conditions when the allocation of string fails,the libssh calls the OSSL_PARAM_free() with the same arguments, which willlikely crash. (CVE-2025-5351)
If there is an error in initializing ChaCha20 cipher with OpenSSL, an invaliderror code is returned. This can happen if there is an heap exhaustion. Thiserror is not correctly detected and could allow libssh to use partiallyinitialized cipher context.
This is caused by the mismatch of return value meaning from OpenSSL and libssh,where OpenSSL error (rv=0) aliases with SSH_OK (0) and is returned directlyfrom the function chacha20_poly1305_set_key(). This will likely cause errorsomewhere down the road. (CVE-2025-5987)
Tenable has extracted the preceding description block directly from the tested product security advisory.
Note that Nessus has not tested for these issues but has instead relied only on the application's self-reported version number.
Solution
Run 'dnf update libssh --releasever 2023.8.20250908' or or 'dnf update --advisory ALAS2023-2025-1155 --releasever 2023.8.20250908' to update your system.
Plugin Details
File Name: al2023_ALAS2023-2025-1155.nasl
Agent: unix
Supported Sensors: Frictionless Assessment AWS, Frictionless Assessment Agent, Nessus Agent, Agentless Assessment, Continuous Assessment, Nessus
Risk Information
Vector: CVSS2#AV:N/AC:L/Au:S/C:C/I:N/A:C
Vector: CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Temporal Vector: CVSS:3.0/E:U/RL:O/RC:C
Vulnerability Information
CPE: cpe:/o:amazon:linux:2023, p-cpe:/a:amazon:linux:libssh-debuginfo, p-cpe:/a:amazon:linux:libssh, p-cpe:/a:amazon:linux:libssh-debugsource, p-cpe:/a:amazon:linux:libssh-devel, p-cpe:/a:amazon:linux:libssh-config
Required KB Items: Host/local_checks_enabled, Host/AmazonLinux/release, Host/AmazonLinux/rpm-list
Exploit Ease: No known exploits are available
Patch Publication Date: 9/8/2025
Vulnerability Publication Date: 6/24/2025