CVE-2017-1000254
Fixed in a distro release EPSS 8%
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.
Products: haxx libcurl
Distro releases
| Release | Package | Fixed in |
|---|---|---|
| Alpine 3.3 | curl | 7.55.0-r1 |
| Alpine 3.4 | curl | 7.55.0-r1 |
| Alpine 3.5 | curl | 7.56.0-r0 |
| Alpine 3.6 | curl | 7.56.0-r0 |
| Amazon Linux 2 | curl | 7.61.1-9.amzn2.0.1 |
| Amazon Linux 2 | libcurl | 7.61.1-9.amzn2.0.1 |
| Amazon Linux 2 | libcurl-devel | 7.61.1-9.amzn2.0.1 |
| Arch Linux | curl | 7.56.0-1 |
| Arch Linux | lib32-curl | 7.56.0-1 |
| Arch Linux | lib32-libcurl-compat | 7.56.0-1 |
| Arch Linux | lib32-libcurl-gnutls | 7.56.0-1 |
| Arch Linux | libcurl-compat | 7.56.0-1 |
| Arch Linux | libcurl-gnutls | 7.56.0-1 |
| Debian 12 | curl | 7.56.1-1 |
| Debian 13 | curl | 7.56.1-1 |
| Debian 14 | curl | 7.56.1-1 |
| Debian 7 | curl | 7.26.0-1+wheezy21 |
| Debian 8 | curl | 7.38.0-4+deb8u6 |
| Debian 9 | curl | 7.52.1-5+deb9u1 |
| Red Hat rhel software collections 3 | httpd24-curl | 0:7.61.1-1.el7 |
| Red Hat rhel software collections 3 | httpd24-curl | 0:7.61.1-1.el6 |
| Red Hat rhel software collections 3 | httpd24-curl-debuginfo | 0:7.61.1-1.el7 |
| Red Hat rhel software collections 3 | httpd24-curl-debuginfo | 0:7.61.1-1.el6 |
| Red Hat rhel software collections 3 | httpd24-httpd | 0:2.4.34-7.el6 |
| Red Hat rhel software collections 3 | httpd24-httpd | 0:2.4.34-7.el7 |
| Red Hat rhel software collections 3 | httpd24-httpd-debuginfo | 0:2.4.34-7.el6 |
| Red Hat rhel software collections 3 | httpd24-httpd-debuginfo | 0:2.4.34-7.el7 |
| Red Hat rhel software collections 3 | httpd24-httpd-devel | 0:2.4.34-7.el6 |
| Red Hat rhel software collections 3 | httpd24-httpd-devel | 0:2.4.34-7.el7 |
| Red Hat rhel software collections 3 | httpd24-httpd-manual | 0:2.4.34-7.el7 |
| Red Hat rhel software collections 3 | httpd24-httpd-manual | 0:2.4.34-7.el6 |
| Red Hat rhel software collections 3 | httpd24-httpd-tools | 0:2.4.34-7.el7 |
| Red Hat rhel software collections 3 | httpd24-httpd-tools | 0:2.4.34-7.el6 |
| Red Hat rhel software collections 3 | httpd24-libcurl | 0:7.61.1-1.el6 |
| Red Hat rhel software collections 3 | httpd24-libcurl | 0:7.61.1-1.el7 |
| Red Hat rhel software collections 3 | httpd24-libcurl-devel | 0:7.61.1-1.el6 |
| Red Hat rhel software collections 3 | httpd24-libcurl-devel | 0:7.61.1-1.el7 |
| Red Hat rhel software collections 3 | httpd24-libnghttp2 | 0:1.7.1-7.el7 |
| Red Hat rhel software collections 3 | httpd24-libnghttp2 | 0:1.7.1-7.el6 |
| Red Hat rhel software collections 3 | httpd24-libnghttp2-devel | 0:1.7.1-7.el6 |
| Red Hat rhel software collections 3 | httpd24-libnghttp2-devel | 0:1.7.1-7.el7 |
| Red Hat rhel software collections 3 | httpd24-mod_ldap | 0:2.4.34-7.el6 |
| Red Hat rhel software collections 3 | httpd24-mod_ldap | 0:2.4.34-7.el7 |
| Red Hat rhel software collections 3 | httpd24-mod_md | 0:2.4.34-7.el7 |
| Red Hat rhel software collections 3 | httpd24-mod_proxy_html | 1:2.4.34-7.el6 |
| Red Hat rhel software collections 3 | httpd24-mod_proxy_html | 1:2.4.34-7.el7 |
| Red Hat rhel software collections 3 | httpd24-mod_session | 0:2.4.34-7.el6 |
| Red Hat rhel software collections 3 | httpd24-mod_session | 0:2.4.34-7.el7 |
| Red Hat rhel software collections 3 | httpd24-mod_ssl | 1:2.4.34-7.el7 |
| Red Hat rhel software collections 3 | httpd24-mod_ssl | 1:2.4.34-7.el6 |
| Red Hat rhel software collections 3 | httpd24-nghttp2 | 0:1.7.1-7.el6 |
| Red Hat rhel software collections 3 | httpd24-nghttp2 | 0:1.7.1-7.el7 |
| Red Hat rhel software collections 3 | httpd24-nghttp2-debuginfo | 0:1.7.1-7.el7 |
| Red Hat rhel software collections 3 | httpd24-nghttp2-debuginfo | 0:1.7.1-7.el6 |
| SUSE Linux Enterprise Desktop 12 SP2 | curl | 7.37.0-37.8.1 |
| SUSE Linux Enterprise Desktop 12 SP3 | curl | 7.37.0-37.8.1 |
| SUSE Linux Enterprise Server 11 SP4 | curl | 7.19.7-1.70.8.1 |
| SUSE Linux Enterprise Server 11-SECURITY | curl-openssl1 | 7.19.7-1.70.8.1 |
| SUSE Linux Enterprise Server 12 SP2 | curl | 7.37.0-37.8.1 |
| SUSE Linux Enterprise Server 12 SP3 | curl | 7.37.0-37.8.1 |
| SUSE Linux Enterprise Server for Raspberry Pi 12 SP2 | curl | 7.37.0-37.8.1 |
| SUSE Linux Enterprise Server for SAP Applications 11 SP4 | curl | 7.19.7-1.70.8.1 |
| SUSE Linux Enterprise Server for SAP Applications 12 SP2 | curl | 7.37.0-37.8.1 |
| SUSE Linux Enterprise Server for SAP Applications 12 SP3 | curl | 7.37.0-37.8.1 |
| SUSE Linux Enterprise Software Development Kit 11 SP4 | curl | 7.19.7-1.70.8.1 |
| SUSE Linux Enterprise Software Development Kit 12 SP2 | curl | 7.37.0-37.8.1 |
| SUSE Linux Enterprise Software Development Kit 12 SP3 | curl | 7.37.0-37.8.1 |
| SUSE Studio Onsite 1.3 | curl | 7.19.7-1.20.53.6.1 |
| SUSE Studio Onsite 1.3 | curl | 7.19.7-1.20.53.13.1 |
| Ubuntu 14.04 LTS | curl | 7.35.0-1ubuntu2.11 |
| Ubuntu 16.04 LTS | curl | 7.47.0-1ubuntu2.3 |
| openSUSE Tumbleweed | curl | 7.79.1-1.1 |