Curl 7.69 < 8.4.0 Heap Buffer Overflow

critical Nessus Plugin ID 182875

Synopsis

The remote host has a program that is affected by a heap buffer overflow flaw.

Description

The version of curl installed on the remote host is affected by a heap based buffer overflow in the SOCKS5 proxy handshake.

When curl is asked to pass along the hostname to the SOCKS5 proxy to allow that to resolve the address instead of it getting done by curl itself, the maximum length that hostname can be is 255 bytes.

If the hostname is detected to be longer than 255 bytes, curl switches to local name resolving and instead passes on the resolved address only to the proxy. Due to a bug, the local variable that means 'let the host resolve the name' could get the wrong value during a slow SOCKS5 handshake, and contrary to the intention, copy the too long hostname to the target buffer instead of copying just the resolved address there.

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

Solution

Upgrade curl to version 8.4.0 or later

See Also

https://curl.se/docs/CVE-2023-38545.html

Plugin Details

Severity: Critical

ID: 182875

File Name: curl_8_4_0_cve-2023-38545.nasl

Version: 1.9

Type: local

Agent: windows, macosx, unix

Family: Misc.

Published: 10/11/2023

Updated: 10/7/2024

Configuration: Enable thorough checks

Supported Sensors: 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:/a:haxx:curl

Required KB Items: installed_sw/Curl

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

IAVA: 2023-A-0531-S