Amazon Linux 2023 : libssh, libssh-config, libssh-devel (ALAS2023-2025-1155)

high Nessus Plugin ID 261738

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.

See Also

https://alas.aws.amazon.com//AL2023/ALAS2023-2025-1155.html

https://alas.aws.amazon.com/faqs.html

https://explore.alas.aws.amazon.com/CVE-2025-4878.html

https://explore.alas.aws.amazon.com/CVE-2025-5318.html

https://explore.alas.aws.amazon.com/CVE-2025-5351.html

https://explore.alas.aws.amazon.com/CVE-2025-5987.html

Plugin Details

Severity: High

ID: 261738

File Name: al2023_ALAS2023-2025-1155.nasl

Version: 1.1

Type: local

Agent: unix

Published: 9/8/2025

Updated: 9/8/2025

Supported Sensors: Frictionless Assessment AWS, Frictionless Assessment Agent, Nessus Agent, Agentless Assessment, Continuous Assessment, Nessus

Risk Information

VPR

Risk Factor: Medium

Score: 6.7

CVSS v2

Risk Factor: High

Base Score: 8.5

Temporal Score: 6.3

Vector: CVSS2#AV:N/AC:L/Au:S/C:C/I:N/A:C

CVSS Score Source: CVE-2025-5318

CVSS v3

Risk Factor: High

Base Score: 8.1

Temporal Score: 7.1

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

CVSS Score Source: CVE-2025-5987

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

Reference Information

CVE: CVE-2025-4878, CVE-2025-5318, CVE-2025-5351, CVE-2025-5987

IAVA: 2025-A-0462