Debian DSA-5523-1 : curl - security update

critical Nessus Plugin ID 182908

Synopsis

The remote Debian host is missing one or more security-related updates.

Description

The remote Debian 11 / 12 host has packages installed that are affected by multiple vulnerabilities as referenced in the dsa-5523 advisory.

- CVE-2023-38545 is a heap-based buffer overflow vulnerability in the SOCKS5 proxy handshake in libcurl and curl. When curl is given a hostname to pass along to a SOCKS5 proxy that is greater than 255 bytes in length, it will switch to local name resolution in order to resolve the address before passing it on to the SOCKS5 proxy. However, due to a bug introduced in 2020, this local name resolution could fail due to a slow SOCKS5 handshake, causing curl to pass on the hostname greater than 255 bytes in length into the target buffer, leading to a heap overflow. The advisory for CVE-2023-38545 gives an example exploitation scenario of a malicious HTTPS server redirecting to a specially crafted URL. While it might seem that an attacker would need to influence the slowness of the SOCKS5 handshake, the advisory states that server latency is likely slow enough to trigger this bug. (CVE-2023-38545)

- CVE-2023-38546 is a cookie injection vulnerability in the curl_easy_duphandle(), a function in libcurl that duplicates easy handles. When duplicating an easy handle, if cookies are enabled, the duplicated easy handle will not duplicate the cookies themselves, but would instead set the filename to none.' Therefore, when the duplicated easy handle is subsequently used, if a source was not set for the cookies, libcurl would attempt to load them from the file named none' on the disk. This vulnerability is rated low, as the various conditions required for exploitation are unlikely. (CVE-2023-38546)

Note that Nessus has not tested for these issues but has instead relied only on the application's self-reported version number.

Solution

Upgrade the curl packages.

For the stable distribution (bookworm), these problems have been fixed in version 7.88.1-10+deb12u4.

See Also

https://security-tracker.debian.org/tracker/source-package/curl

https://www.debian.org/security/2023/dsa-5523

https://security-tracker.debian.org/tracker/CVE-2023-38545

https://security-tracker.debian.org/tracker/CVE-2023-38546

https://packages.debian.org/source/bullseye/curl

https://packages.debian.org/source/bookworm/curl

Plugin Details

Severity: Critical

ID: 182908

File Name: debian_DSA-5523.nasl

Version: 1.5

Type: local

Agent: unix

Published: 10/11/2023

Updated: 12/8/2023

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

Risk Information

VPR

Risk Factor: High

Score: 7.4

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-38545

CVSS v3

Risk Factor: Critical

Base Score: 9.8

Temporal Score: 8.8

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

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

Vulnerability Information

CPE: cpe:/o:debian:debian_linux:11.0, p-cpe:/a:debian:debian_linux:libcurl4, p-cpe:/a:debian:debian_linux:curl, cpe:/o:debian:debian_linux:12.0, p-cpe:/a:debian:debian_linux:libcurl3-nss, p-cpe:/a:debian:debian_linux:libcurl4-gnutls-dev, p-cpe:/a:debian:debian_linux:libcurl4-doc, p-cpe:/a:debian:debian_linux:libcurl3-gnutls, p-cpe:/a:debian:debian_linux:libcurl4-nss-dev, p-cpe:/a:debian:debian_linux:libcurl4-openssl-dev

Required KB Items: Host/local_checks_enabled, Host/Debian/release, Host/Debian/dpkg-l

Exploit Available: true

Exploit Ease: Exploits are available

Patch Publication Date: 10/11/2023

Vulnerability Publication Date: 10/11/2023

Reference Information

CVE: CVE-2023-38545, CVE-2023-38546

IAVA: 2023-A-0531-S