FlawAtlas
Search the atlas
CVE-2018-1000300 High

FTP shutdown response buffer overflow

curl might overflow a heap based memory buffer when closing down an FTP connection with long server command replies. When doing FTP transfers, curl keeps a spare "closure handle" around internally that is used when an FTP connection gets shut down since the original curl easy handle is then already removed. FTP server response data that gets cached from the original transfer might then be larger than the default buffer size (16 KB) allocated in the "closure handle", which can lead to a buffer overwrite. The contents and size of that overwrite is controllable by the server. This situation was detected by an assert() in the code, but that was of course only preventing bad stuff in debug builds. This bug is highly unlikely to trigger with non-malicious servers.

Exploit probability 4.8%
Published May 16, 2018
Required by Not available
Last source change May 27, 2026

02 / AFFECTED SOFTWARE

Affected packages

Unknown Unknown

8 explicit affected versions

Unknown Unknown

16 explicit affected versions

03 / CONNECTIONS

Connected vulnerabilities

04 / EVIDENCE

Source records

Open Source Vulnerabilities CVE-2018-1000300

curl version curl 7.54.1 to and including curl 7.59.0 contains a CWE-122: Heap-based Buffer Overflow vulnerability in denial of service and more that can result in curl might overflow a heap based memory buffer when closing down an FTP connection with very long server command replies.. This vulnerability appears to have been fixed in curl < 7.54.1 and curl >= 7.60.0.

View original source
Open Source Vulnerabilities CURL-CVE-2018-1000300

curl might overflow a heap based memory buffer when closing down an FTP connection with long server command replies. When doing FTP transfers, curl keeps a spare "closure handle" around internally that is used when an FTP connection gets shut down since the original curl easy handle is then already removed. FTP server response data that gets cached from the original transfer might then be larger than the default buffer size (16 KB) allocated in the "closure handle", which can lead to a buffer overwrite. The contents and size of that overwrite is controllable by the server. This situation was detected by an assert() in the code, but that was of course only preventing bad stuff in debug builds. This bug is highly unlikely to trigger with non-malicious servers.

View original source

05 / REFERENCES

Further evidence