PT-2018-1158 · Curl+5 · Curl+5

Karl Henselin

·

Published

2018-01-29

·

Updated

2026-05-18

·

CVE-2018-1000120

CVSS v3.1

9.8

Critical

VectorAV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Name of the Vulnerable Software and Affected Versions curl versions 7.12.3 through 7.58.0
Description A buffer overflow exists in the FTP URL handling of curl, allowing an attacker to cause a denial of service or worse. The vulnerability is triggered when curl is told to work on an FTP URL with the setting to only issue a single CWD command. The --ftp-method singlecwd or the libcurl alternative CURLOPT FTP FILEMETHOD can be used to exploit this issue. If the directory part of the URL contains a %00 sequence, the directory length might end up shorter than the file name path, making the calculation size t index = directory len - filepart len end up with a huge index variable for where the zero byte gets stored. This can lead to overwriting memory before the intended heap buffer.
Recommendations For curl versions 7.12.3 through 7.58.0, consider disabling the --ftp-method singlecwd option or the libcurl alternative CURLOPT FTP FILEMETHOD to minimize the risk of exploitation. Avoid using FTP URLs with the %00 sequence in the directory part until the issue is resolved. As a temporary workaround, restrict access to the FTP URL handling functionality to prevent potential attacks. At the moment, there is no information about a newer version that contains a fix for this vulnerability.

DoS

Heap Based Buffer Overflow

Memory Corruption

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

ALT-PU-2018-1518
ALT-PU-2018-2456
BDU:2018-00605
BDU:2019-04402
CESA-2018_3157
CLEANSTART-2026-AY18527
CLEANSTART-2026-BW46578
CLEANSTART-2026-DI23929
CLEANSTART-2026-LQ42192
CLEANSTART-2026-OF85770
CVE-2018-1000120
DLA-1309-1
DSA-4136-1
GHSA-674J-7M97-J2P9
MGASA-2018-0423
OPENSUSE-SU-2024:10582-1
RHSA-2018:3157
RHSA-2018:3558
RHSA-2018_3157
RHSA-2020:0544
RHSA-2020:0594
SUSE-SU-2018:0769-1
SUSE-SU-2018:1323-1
SUSE-SU-2018:2629-1
SUSE-SU-2018_1323-1
USN-3598-1
USN-3598-2

Affected Products

Alt Linux
Centos
Red Hat
Suse
Ubuntu
Curl