libcurl may read outside of a heap allocated buffer when doing FTP. When libcurl connects to an FTP server and successfully logs in (anonymous or not), it asks the server for the current directory with the `PWD` command. The server then responds with a 257 response containing the path, inside double quotes. The returned path name is then kept by libcurl for subsequent uses. Due to a flaw in the string parser for this directory name, a directory name passed like this but without a closing double quote would lead to libcurl not adding a trailing NUL byte to the buffer holding the name. When libcurl would then later access the string, it could read beyond the allocated heap buffer and crash or wrongly access data beyond the buffer, thinking it was part of the path. A malicious server could abuse this fact and effectively prevent libcurl-based clients to work with it - the PWD command is always issued on new FTP connections and the mistake has a high chance of causing a segfault. The simple fact that this has issue remained undiscovered for this long could suggest that malformed PWD responses are rare in benign servers. We are not aware of any exploit of this flaw. This bug was introduced in commit [415d2e7cb7](https://github.com/curl/curl/commit/415d2e7cb7), March 2005. In libcurl version 7.56.0, the parser always zero terminates the string but also rejects it if not terminated properly with a final double quote.
CVSS Details
- CVSS 3.0 Base Score: 7.5
- CVSS 3.0 Vector: (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H)
Covered by Rapid7
| Product | Vendor Advisory | Solution File | Added | Published |
|---|---|---|---|---|
| Alpine Linux | — | Upgrade curl | Oct 25, 2017 | Oct 6, 2017 |
| Amazon Linux Ami 2 | — | Upgrade curlUpgrade libcurl-develUpgrade libcurlUpgrade curl-debuginfo | Apr 27, 2020 | Oct 6, 2017 |
| Amazon_linux | — | Upgrade curl | Nov 3, 2017 | Oct 6, 2017 |
| Apple Osx Curl | — | Upgrade macOS to the latest versionApply OS X security update 2017-005 El CapitanApply OS X security update 2017-002 Sierra | Dec 7, 2017 | Oct 6, 2017 |
| Arch Linux | — | Upgrade to the latest version of Arch Linux | Jul 11, 2025 | Oct 6, 2017 |
| Debian | — | Upgrade curl | Oct 7, 2017 | Oct 6, 2017 |
| Freebsd | — | Upgrade curl | Dec 10, 2025 | Oct 4, 2017 |
| Gentoo Linux | — | Upgrade net-misc/curl. | Dec 18, 2017 | Oct 6, 2017 |
| Huawei Euleros 2_0_sp1 | — | Upgrade curlUpgrade libcurl-develUpgrade libcurl | Dec 4, 2017 | Oct 6, 2017 |
| Huawei Euleros 2_0_sp2 | — | Upgrade libcurlUpgrade curlUpgrade libcurl-devel | Dec 4, 2017 | Oct 6, 2017 |
| Oracle Solaris | — | Upgrade web/curl to version 7.59.0-0.175.3.33.0.3.0 on Solaris 11.3 | Jun 18, 2018 | Oct 6, 2017 |
| Redhat_linux | — | No solution exists | Jul 9, 2025 | Oct 4, 2017 |
| Suse | — | Upgrade curl-openssl1Upgrade curlUpgrade libcurl4-x86Upgrade libcurl-develUpgrade libcurl4-openssl1-32bitUpgrade libcurl4Upgrade libcurl4-32bitUpgrade libcurl4-openssl1-x86Upgrade libcurl4-openssl1 | Oct 23, 2017 | Oct 6, 2017 |
| Ubuntu | — | Upgrade libcurl3-gnutlsUpgrade curlUpgrade libcurl3-nssUpgrade libcurl3 | Oct 10, 2017 | Oct 6, 2017 |
| Vmware Photon_os | — | Use 'tdnf update' to upgrade all packages to the latest version. | Jan 20, 2025 | Oct 6, 2017 |
Prioritise with Active Threat Intelligence
With curated Threat Intelligence, you can see which vulnerabilities truly put you at risk, prioritize what matters most, and act before attackers do.
Explore Intelligence Hub