Amazon Linux 2023 : curl, curl-minimal, libcurl (ALAS2023-2023-193)

high Nessus Plugin ID 176898

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-2023-193 advisory.

The curl advisory describes this issue as follows:

curl supports communicating using the TELNET protocol and as a part of this it offers users to pass on user name and telnet options for the server negotiation.

Due to lack of proper input scrubbing and without it being the documented functionality, curl would pass on user name and telnet options to the server as provided. This could allow users to pass in carefully crafted content that pass on content or do option negotiation without the application intending to do so.
In particular if an application for example allows users to provide the data or parts of the data.
(CVE-2023-27533)

The curl advisory describes this issue as follows:

curl supports SFTP transfers. curl's SFTP implementation offers a special feature in the path component of URLs: a tilde (~) character as the first path element in the path to denotes a path relative to the user's home directory. This is supported because of wording in the once proposed to-become RFC draft that was to dictate how SFTP URLs work.

Due to a bug, the handling of the tilde in SFTP path did however not only replace it when it is used stand-alone as the first path element but also wrongly when used as a mere prefix in the first element.

Using a path like /~2/foo when accessing a server using the user dan (with home directory /home/dan) would then quite surprisingly access the file /home/dan2/foo.

This can be taken advantage of to circumvent filtering or worse. (CVE-2023-27534)

The curl advisory describes this issue as follows:

libcurl would reuse a previously created FTP connection even when one or more options had been changed that could have made the effective user a very different one, thus leading to the doing the second transfer with wrong credentials. (CVE-2023-27535)

The curl advisory describes this issue as follows:

libcurl would reuse a previously created connection even when the GSS delegation (CURLOPT_GSSAPI_DELEGATION) option had been changed that could have changed the user's permissions in a second transfer.

libcurl keeps previously used connections in a connection pool for subsequent transfers to reuse if one of them matches the setup. However, this GSS delegation setting was left out from the configuration match checks, making them match too easily, affecting krb5/kerberos/negotiate/GSSAPI transfers. (CVE-2023-27536)

The curl advisory describes this issue as follows:

libcurl supports sharing HSTS data between separate handles. This sharing was introduced without considerations for doing this sharing across separate threads, but there was no indication of this fact in the documentation. Due to missing mutexes or thread locks, two threads sharing the same HSTS data could end up doing a double-free or use-after-free. (CVE-2023-27537)

The curl advisory describes this issue as follows:

libcurl would reuse a previously created connection even when an SSH related option had been changed that should have prohibited reuse.

libcurl keeps previously used connections in a connection pool for subsequent transfers to reuse if one of them matches the setup. However, two SSH settings were left out from the configuration match checks, making them match too easily. (CVE-2023-27538)

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 curl --releasever 2023.0.20230607' to update your system.

See Also

https://alas.aws.amazon.com/AL2023/ALAS-2023-193.html

https://alas.aws.amazon.com/cve/html/CVE-2023-27533.html

https://alas.aws.amazon.com/cve/html/CVE-2023-27534.html

https://alas.aws.amazon.com/cve/html/CVE-2023-27535.html

https://alas.aws.amazon.com/cve/html/CVE-2023-27536.html

https://alas.aws.amazon.com/cve/html/CVE-2023-27537.html

https://alas.aws.amazon.com/cve/html/CVE-2023-27538.html

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

Plugin Details

Severity: High

ID: 176898

File Name: al2023_ALAS2023-2023-193.nasl

Version: 1.2

Type: local

Agent: unix

Published: 6/8/2023

Updated: 12/11/2024

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

Risk Information

VPR

Risk Factor: Medium

Score: 6.7

CVSS v2

Risk Factor: Critical

Base Score: 10

Temporal Score: 7.8

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

CVSS Score Source: CVE-2023-27533

CVSS v3

Risk Factor: High

Base Score: 8.8

Temporal Score: 7.9

Vector: CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Temporal Vector: CVSS:3.0/E:P/RL:O/RC:C

CVSS Score Source: CVE-2023-27534

Vulnerability Information

CPE: p-cpe:/a:amazon:linux:libcurl, p-cpe:/a:amazon:linux:libcurl-devel, p-cpe:/a:amazon:linux:curl-debuginfo, p-cpe:/a:amazon:linux:curl-debugsource, p-cpe:/a:amazon:linux:curl-minimal, p-cpe:/a:amazon:linux:curl-minimal-debuginfo, p-cpe:/a:amazon:linux:libcurl-debuginfo, p-cpe:/a:amazon:linux:libcurl-minimal-debuginfo, p-cpe:/a:amazon:linux:libcurl-minimal, p-cpe:/a:amazon:linux:curl, cpe:/o:amazon:linux:2023

Required KB Items: Host/local_checks_enabled, Host/AmazonLinux/release, Host/AmazonLinux/rpm-list

Exploit Available: true

Exploit Ease: Exploits are available

Patch Publication Date: 6/5/2023

Vulnerability Publication Date: 3/20/2023

Reference Information

CVE: CVE-2023-27533, CVE-2023-27534, CVE-2023-27535, CVE-2023-27536, CVE-2023-27537, CVE-2023-27538

IAVA: 2023-A-0153-S